-
Notifications
You must be signed in to change notification settings - Fork 19
Rule fixes post scratch-vm review #1
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Automatically include Node globals when using the node config
Array brackets should not have spaces inside of them BREAKING CHANGE: http://eslint.org/docs/rules/array-bracket-spacing ([2, 'never'])
BREAKING CHANGE: http://eslint.org/docs/rules/block-spacing ([2, 'always'])
BREAKING CHANGE: http://eslint.org/docs/rules/comma-spacing ([2])
BREAKING CHANGE: http://eslint.org/docs/rules/comma-style ([2])
BREAKING CHANGE: http://eslint.org/docs/rules/eol-last ([2, 'always'])
BREAKING CHANGE: http://eslint.org/docs/rules/func-call-spacing ([2, 'always'])
Object properties should not use quotes unless necessary, in which case all properties of the object should use quotes. BREAKING CHANGE: http://eslint.org/docs/rules/quote-props ([2, 'consistent-as-needed'])
Because of the addition of quote-props, the linter picked up non-camelcase object props. Object properties shouldn't be linted for camelcase.
Semicolons should have spaces after them, and not before them. Obviously. BREAKING CHANGE: http://eslint.org/docs/rules/semi-spacing ([2])
Objects shouldn't have spaces after the opening curly or before the closing one. BREAKING CHANGE: http://eslint.org/docs/rules/object-curly-spacing ([2])
There shouldn't be spaces in parens BREAKING CHANGE: http://eslint.org/docs/rules/space-in-parens ([2])
There should be spaces around infix operators BREAKING CHANGE: http://eslint.org/docs/rules/space-infix-ops ([2])
There should be spaces after word unary ops, but there shouldn't be spaces before nonword unary ops. BREAKING CHANGE: http://eslint.org/docs/rules/space-unary-ops ([2])
Comments should have a space after the opening comment character BREAKING CHANGE: http://eslint.org/docs/rules/spaced-comment ([2])
(Merged so I can update the scratch-vm PR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the whitespace rules @thisandagain pointed out in scratchfoundation/scratch-vm#298.
I missed a lot of whitespace-related rules because I mistook the "autofix" symbol on http://eslint.org/docs/rules/ for the "included in eslint/recommended" symbol. So I added the ones that make sense for us (we already adhere to them in scratch-vm).
One more worth pointing out is
'quote-props': [2, 'consistent-as-needed']
: Object properties should not use quotes unless necessary, in which case all properties of the object should use quotes.After I added and fixed this in scratch-vm, it pointed out I was too strict with the camelcase rule, so that now excludes object properties from needing to be camelcase (we use many underscores in object properties in scratch-vm).