-
Notifications
You must be signed in to change notification settings - Fork 286
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
Add Prettier to ESLint configuration. #1206
Conversation
@@ -62,13 +64,12 @@ module.exports = { | |||
node: true | |||
}, | |||
plugins: ['node'], | |||
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { |
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.
ESLint 6.8+ allows us to use extends
directly in the overrides configuration, so we no longer need this manual shenanigans.
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.
@rwjblue I tend to turn off trailing commas myself. What do other Ember repos tend to do?
I usually try to go with the defaults as much as possible (with single quotes being the one exception). Ember, Ember Data, Ember CLI, ember-test-helpers all have trailing commas on (set to Also, FWIW, in this PR I didn't actually change/modify the prettier configuration (it was introduced in #1112 / #1093). |
@rwjblue yeah, trailing commas wasn't on by default until prettier 2.0 though. Now that it is on by default, I typically disable. I am fine going with what the group wants though, not going to die on this hill. |
This will help ensure prettier formatting is properly enforced throughout the codebase, and that colloborators' that have "format on save" don't clash with each other by using varying versions of prettier.
Prior to this change, we had a
.prettierrc.js
in the repo that somecontributors used with their editors' "format on save" ability, but
since it was not enforced by linting it was very inconsistent throughout
the codebase.
This change does a few things (best reviewed as separate commits):
prettier
related packages todevDependencies
.eslintrc.js
yarn lint:js --fix