-
Notifications
You must be signed in to change notification settings - Fork 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
remove remaining style-only rules, add additional correctness rules, update deps #8
Conversation
tried this in my project's repo - only autofixable errors are generated, so this should be simple to adopt for us. |
'no-alert': 'error', | ||
'no-var': 'error', | ||
'prefer-const': 'error', | ||
'prefer-arrow-callback': 'error' | ||
'prefer-arrow-callback': 'error', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm still not totally sure I see the boundary between style rules + correctness rules -- I can see an argument for prefer-arrow-callback
being a style rule and not a correctness rule. The two examples given in the description of the rule both seem to me like things that wouldn't change any behavior but just look nicer 🤷♂️
The other rules make sense to me because they're preventing you from doing something dumb, but prefer-arrow-callback
seems like more of a stylistic thing to me? Unless I'm missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'd say prefer-arrow-callback
is not a correctness rule, but it does encourage the use of new es6 features that are terse or give more signal (like const/let vs var), and it's also not a controversial rule. I guess the main thing I wanted to change was to avoid purely stylistic rules; like spacing, semis, etc.
* locking to es6, as we don't assume babel compilation for node services | ||
* using `eslint-config-standard` instead of `standard`, since we want to add additional rules | ||
* adding additional rules that either promote correctness or a higher signal-to-noise ratio | ||
* avoiding rules that are purely stylistic in nature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sawyerh @samskeller wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
new projects will use this eslint config, and we want it to just be standardjs plus additional rules that help enforce correctness, no style. each existing project can add its own style rules or (suggested) use eslint --fix to automatically adhere to this config.