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

remove remaining style-only rules, add additional correctness rules, update deps #8

Merged
merged 3 commits into from
Jul 30, 2018

Conversation

kencheeto
Copy link
Contributor

  • remove remaining style-only rules
  • adds additional correctness rules
  • updates dependencies

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.

@kencheeto kencheeto requested review from sawyerh and samskeller July 28, 2018 22:00
@kencheeto
Copy link
Contributor Author

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',

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?

Copy link
Contributor Author

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kencheeto kencheeto merged commit 467dd5d into master Jul 30, 2018
@kencheeto kencheeto deleted the kenshiro-4.0.0 branch July 30, 2018 21:05
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

Successfully merging this pull request may close these issues.

3 participants