Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore node_modules #31

Closed
StarpTech opened this issue Oct 1, 2017 · 6 comments
Closed

Ignore node_modules #31

StarpTech opened this issue Oct 1, 2017 · 6 comments

Comments

@StarpTech
Copy link

> prettier-standard ./packages/hemera-sql-store/**/*.js

prettier-eslint [ERROR]: prettier formatting failed due to a prettier error
prettier-standard [ERROR]: There was an error formatting "./packages/hemera-sql-store/node_modules/resolve/index.js":
    SyntaxError: Unexpected token, expected => (10:7)
       8 |
       9 | exports = async
    > 10 | module.exports = async
         |       ^
      11 |
        at createError$1 (E:\Repositorys\hemera\node_modules\prettier\parser-babylon.js:1:112)
        at parse (E:\Repositorys\hemera\node_modules\prettier\parser-babylon.js:1:808)
        at Object.parse (E:\Repositorys\hemera\node_modules\prettier\index.js:3819:12)
        at formatWithCursor (E:\Repositorys\hemera\node_modules\prettier\index.js:21709:22)
        at format (E:\Repositorys\hemera\node_modules\prettier\index.js:21749:10)
        at Object.format (E:\Repositorys\hemera\node_modules\prettier\index.js:21974:12)
        at prettify (E:\Repositorys\hemera\node_modules\prettier-eslint\dist\index.js:149:29)
        at format (E:\Repositorys\hemera\node_modules\prettier-eslint\dist\index.js:135:20)
        at MapSubscriber.project (E:\Repositorys\hemera\node_modules\prettier-standard\lib\format-files.js:290:55)
        at MapSubscriber._next (E:\Repositorys\hemera\node_modules\rxjs\operator\map.js:77:35)
failure formatting 1 file with prettier-standard

.eslintignore

!/*.js
/tests/**/*.js
!/tests/**/jsfmt.spec.js
!/**/.eslintrc.js
/test.js
/dist/
**/node_modules/**
/website/static/lib/
/tests_integration/cli/
.nyc_output
coverage
test

.prettierignore

node_modules
@sheerun
Copy link
Owner

sheerun commented Oct 1, 2017

I think it's because without quotes it uses shell expansion instead of node.

So following probably should work:

prettier-standard './packages/hemera-sql-store/**/*.js'

Could you confirm?

@StarpTech
Copy link
Author

StarpTech commented Oct 1, 2017

@sheerun I can't because when I run prettier-standard './packages/hemera-sql-store/**/*.js' nothing happens the command is finished after a second.

> hemera@ format E:\Repositorys\hemera
> prettier-standard './packages/hemera-sql-store/**/*.js'

when I run "format": "prettier-standard \"./packages/hemera-sql-store/**/*.js\"", it takes longer but I get the same error as above.

@sheerun
Copy link
Owner

sheerun commented Oct 1, 2017

what happens when you use just prettier?

@StarpTech
Copy link
Author

When I only use prettier it works

@sheerun
Copy link
Owner

sheerun commented Oct 1, 2017

I can't reproduce this. In my case prettier-standard ignores all files even in nested node_modules. Maybe you're using old version of prettier-standard?

@sheerun
Copy link
Owner

sheerun commented Oct 4, 2017

I think you need to use single quotes

@sheerun sheerun closed this as completed Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants