-
Notifications
You must be signed in to change notification settings - Fork 511
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
chore: Opt in more folders to ESLint #2734
Conversation
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 left out opting in the libs/
since there are some funnier changes like another sub-yarn.lock needed
{ | ||
files: ["**/cli.js"], | ||
rules: { | ||
"node/shebang": 0, |
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.
This can be removed if #2156 lands, as it just complains if it isn't a registered bin value
.eslintrc.js
Outdated
}, | ||
], | ||
"node/no-unpublished-import": "off", | ||
"no-undef": "off", |
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.
This was for the arguments
call, and could probably be inline instead
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.
What arguments
call??
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.
Line 53 in a366301
res = creator.apply(this, arguments); |
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.
Remove this line and wait for #2747
I tested it and it means we don't need to have this rule.
@@ -1,3 +1,4 @@ | |||
/* eslint-disable node/no-missing-require */ |
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 think the plugin just doesn't understand the local dependencies like "@yari-internal/constants": "file:../../../libs/constants",
in the package.json, so ignored at the file level here. A few others under the libs/
so maybe a better solution is needed globally later
@peterbe I'm guessing this is for your review |
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.
Looks very promising. I just don't get the inclusion of the tsx
files. create-react-app
isn't perfect(*), far from it, but it's quite well maintained and it does take care of setting up its own eslint
configuration.
(*) One frustrating thing is that you have to run yarn build
to find out what eslint
violations you have. Or you can start the webpack dev server (yarn start
) and it'll print them out on the terminal. I wish it would ship with something similar to yarn build
but basically work like we do with our Node code (much thanks to you!)
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.
2052841
to
d6c9b99
Compare
No description provided.