-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Eslint config defaults #526
Conversation
- react/jsx-quotes has been superseded by jsx-quotes - eqeqeq now covers comparisons to null
module.exports = eslintrc; | ||
module.exports = { | ||
'extends': [ | ||
// Need to qualify these here for ESLint to resolve them properly. |
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.
can you not just reference them relatively? I think that issue was why I was constructing a rules object instead of just extending 'base' previously. Can eslint resolve these when running npm run lint
without special linking magicks?
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.
npm run lint
didn't work when referencing them relatively. It interpreted them as the names of eslint-config-*
packages for some reason.
It's possible that doing something like https://github.com/walmartlabs/eslint-config-defaults/blob/master/package.json#L34 involving making main
not be index.js
could work, but I didn't try it, because this approach seemed tolerable.
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 believe all extends
in eslint
have to be named starting with "eslint-config", or a scoped package with the name ending in "/eslint-config".
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.
@ljharb I have no clue - the relative imports work here: https://github.com/airbnb/javascript/pull/526/files#diff-ca246d3b4ba146243647f872c0e7e8d1R3, but they didn't work on index.js
. ¯_(ツ)_/¯
Lovely! Love open source. Thanks @taion! 🍻 |
This is super awesome guys! Nice work! |
Closes #522.
@justjake: I can see why you didn't want to do this. This was a lot more time-consuming than I had anticipated.
It's split up into 3 commits:
eslint-config-defaults
and plug them in.