-
Notifications
You must be signed in to change notification settings - Fork 416
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
prettier and eslint configs conflict and break tests #515
Comments
7 tasks
asprouse
changed the title
prettier and eslint configs conflict
prettier and eslint configs conflict and break tests
Jun 14, 2019
Let's get this one fixed first, before anyone else runs into infinite fix
loops.
In general, the current eslint settings should be used by prettier and not
vice versa (as you proposed) - these were in place for a very long time and
proved to be good.
Can you provide a PR for the fix, or should I investigate?
…On Fri, Jun 14, 2019 at 2:45 AM Andrew Sprouse ***@***.***> wrote:
This is a Bug Report Description
Prettier has the bracketSpacing: false while eslint expects spacing
around brackets for example right after committing code if I run eslint
again I get these errors:
$ npm run eslint
> ***@***.*** eslint /Users/als/code/serverless-webpack
> node node_modules/eslint/bin/eslint.js --ext .js lib
/Users/als/code/serverless-webpack/lib/packagers/yarn.js
31:18 error A space is required after '[' array-bracket-spacing
31:76 error A space is required before ']' array-bracket-spacing
60:38 error A space is required after '{' object-curly-spacing
60:57 error A space is required before '}' object-curly-spacing
128:18 error A space is required after '[' array-bracket-spacing
128:70 error A space is required before ']' array-bracket-spacing
135:46 error A space is required after '{' object-curly-spacing
135:50 error A space is required before '}' object-curly-spacing
146:20 error A space is required after '[' array-bracket-spacing
146:38 error A space is required before ']' array-bracket-spacing
148:48 error A space is required after '{' object-curly-spacing
148:52 error A space is required before '}' object-curly-spacing
/Users/als/code/serverless-webpack/lib/packagers/yarn.test.js
50:52 error A space is required after '{' object-curly-spacing
50:77 error A space is required before '}' object-curly-spacing
56:1 error Expected indentation of 8 spaces but found 10 indent
57:1 error Expected indentation of 10 spaces but found 12 indent
58:1 error Expected indentation of 10 spaces but found 12 indent
58:13 error A space is required after '[' array-bracket-spacing
58:59 error A space is required before ']' array-bracket-spacing
59:1 error Expected indentation of 10 spaces but found 12 indent
59:13 error A space is required after '{' object-curly-spacing
59:27 error A space is required before '}' object-curly-spacing
60:1 error Expected indentation of 8 spaces but found 10 indent
113:27 error A space is required after '{' object-curly-spacing
113:62 error A space is required before '}' object-curly-spacing
234:27 error A space is required after '{' object-curly-spacing
234:72 error A space is required before '}' object-curly-spacing
242:13 error A space is required after '[' array-bracket-spacing
242:65 error A space is required before ']' array-bracket-spacing
254:27 error A space is required after '{' object-curly-spacing
254:72 error A space is required before '}' object-curly-spacing
257:38 error A space is required after '{' object-curly-spacing
257:58 error A space is required before '}' object-curly-spacing
303:27 error A space is required after '{' object-curly-spacing
303:57 error A space is required before '}' object-curly-spacing
306:41 error A space is required after '[' array-bracket-spacing
306:52 error A space is required before ']' array-bracket-spacing
312:11 error A space is required after '[' array-bracket-spacing
312:23 error A space is required before ']' array-bracket-spacing
319:11 error A space is required after '[' array-bracket-spacing
319:23 error A space is required before ']' array-bracket-spacing
/Users/als/code/serverless-webpack/lib/utils.js
112:17 error A space is required after '{' object-curly-spacing
112:32 error A space is required before '}' object-curly-spacing
✖ 43 problems (43 errors, 0 warnings)
43 errors and 0 warnings potentially fixable with the `--fix` option.
Prettier should be set up as an ESLint rule using
https://github.com/prettier/eslint-plugin-prettier this way linting and
formatting is done when running npx eslint --fix.
Additional Data
- *Serverless-Webpack Version you're using*: 5.3.1
- *Webpack version you're using*:4.33.0
- *Serverless Framework Version you're using*: 1.30.3
- *Operating System*: OS X 10.13
- *Stack Trace (if available)*:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#515?email_source=notifications&email_token=ABKEZXWJYKJQUDOILF6N7UDP2LS3ZA5CNFSM4HYCKRXKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZOGJHA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABKEZXQ6HPUQMP6MRWW7DK3P2LS3ZANCNFSM4HYCKRXA>
.
|
Sure! If you prefer the ESLint config then we can try prettier-eslint-cli which runs prettier then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a Bug Report
Description
Prettier has the
bracketSpacing: false
while eslint expects spacing around brackets for example right after committing code if I run eslint again I get these errors:Another issue is that
trailingComma: 'all'
breaks tests in node v6 where dangling commas in function arguments is not allowed.Prettier should be set up as an ESLint rule using https://github.com/prettier/eslint-plugin-prettier this way linting and formatting is done when running
npx eslint --fix
. Another option is https://github.com/prettier/prettier-eslint-cli.Additional Data
The text was updated successfully, but these errors were encountered: