-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
tools: refactor .eslintrc.js #27789
tools: refactor .eslintrc.js #27789
Conversation
This comment has been minimized.
This comment has been minimized.
@@ -236,7 +213,7 @@ module.exports = { | |||
{ | |||
selector: "CallExpression[callee.property.name='strictEqual'][arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])", | |||
message: 'The first argument should be the `actual`, not the `expected` value.', | |||
} | |||
}, |
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.
If you want to have a consistent style, what about enabling the rule at the top of the file? That way it would be possible to slowly migrate some files.
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.
if i remove the _findPath hack eslint still fails for me.
Oops! Something went wrong! :(
ESLint: 5.15.1.
ESLint couldn't find the plugin "eslint-plugin-markdown". This can happen for a couple different reasons:
1. If ESLint is installed globally, then make sure eslint-plugin-markdown is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.
2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
npm i eslint-plugin-markdown@latest --save-dev
Path to ESLint package: /Users/gus/.npm-global/lib/node_modules/eslint
If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.
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.
meant to do request changes not approve
@devsnek What are you running to get that error? |
@devsnek Are you running a globally-installed |
Ah, yes, installing Any openness to the idea that perhaps that shouldn't be supported? (I'm unsure myself. I see the benefit of stuff just-working for someone.) |
I think we should definitely be supporting global eslint because that's how editors run linting. lint-js isn't the only usage. |
97a7abc
to
895e979
Compare
OK! I've left out that change and instead added a comment explaining why the monkeypatching is necessary so no one else comes along and tries to undo it. @devsnek PTAL Lite CI: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/3616/ |
* Add a comment explaining the Module._findPath() hacks so that someone else doesn't do what I do and try to remove them because they seem unnecessary for `make lint` and friends. * Add a trailing comma for consistency with the rest of the file.
895e979
to
7a144e0
Compare
Fixed a tiny thing in the comment. Running Lite CI again... Lite CI: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/3617/ |
Landed in 5b8df5e |
* Add a comment explaining the Module._findPath() hacks so that someone else doesn't do what I do and try to remove them because they seem unnecessary for `make lint` and friends. * Add a trailing comma for consistency with the rest of the file. PR-URL: nodejs#27789 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
* Add a comment explaining the Module._findPath() hacks so that someone else doesn't do what I do and try to remove them because they seem unnecessary for `make lint` and friends. * Add a trailing comma for consistency with the rest of the file. PR-URL: #27789 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes