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
New: noInlineConfig setting (refs eslint/rfcs#22) #12091
Conversation
I'm not sure why |
I think it's failing just as it does not support fixing cross-repo issue. :) |
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.
Thanks for working on this!
@@ -1019,7 +1042,9 @@ class Linter { | |||
} | |||
|
|||
// search and apply "eslint-env *". | |||
const envInFile = findEslintEnv(text); | |||
const envInFile = options.allowInlineConfig && !options.warnInlineConfig |
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.
Nice find
I have updated this PR.
|
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.
LGTM, thanks! (Left one question but it's not a blocker.)
"eslint-enable eqeqeq", | ||
"eslint-env es6" | ||
]) { | ||
// eslint-disable-next-line no-loop-func |
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.
Just out of curiosity, why does no-loop-func
think there is a problem here?
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.
Probably due to linter
variable. It's shared in the callback in this loop.
I think we can merge this (even with the commit-message status message, since that's due to a limitation in eslint-github-bot), but I am unable to merge from my phone. |
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.
LGTM. Thanks for working on this!
Should there be a follow up issue to document |
Probably. Issue and/or PR would be welcome! |
I also found the missing of docs, then I have added it while #12151. |
What is the purpose of this pull request? (put an "X" next to item)
[X] Add something to the core
What changes did you make? (Give an overview)
This PR implements a part of eslint/rfcs#22,
noInlineConfig
setting.Also, this PR fixes a bug that
--no-inline-config
didn't disableeslint-env
comments.Is there anything you'd like reviewers to focus on?
Nothing in particular.