-
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: question about some ESLint config options #12566
Comments
|
@gibfahn I think it can even prevent some murky bugs: if somebody forgetfully leaves some .eslintrc config in a parent directory above node repo directory, some node rules can be overwritten. |
why do you want to enable it? We don't have any module files yet, do we?
|
root: true at the top of the main |
|
No. That would be incorrect as those rules are for ES Modules, e.g. no top-level |
This option prevents ESlint from unnecessary searching in parent folders. It also protects ESlint rules from accidental rewriting by a config in a parent folder. PR-URL: #12570 Fixes: #12566 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This option prevents ESlint from unnecessary searching in parent folders. It also protects ESlint rules from accidental rewriting by a config in a parent folder. PR-URL: #12570 Fixes: #12566 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This option prevents ESlint from unnecessary searching in parent folders. It also protects ESlint rules from accidental rewriting by a config in a parent folder. PR-URL: #12570 Fixes: #12566 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This option prevents ESlint from unnecessary searching in parent folders. It also protects ESlint rules from accidental rewriting by a config in a parent folder. PR-URL: #12570 Fixes: #12566 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This option prevents ESlint from unnecessary searching in parent folders. It also protects ESlint rules from accidental rewriting by a config in a parent folder. PR-URL: #12570 Fixes: #12566 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This option prevents ESlint from unnecessary searching in parent folders. It also protects ESlint rules from accidental rewriting by a config in a parent folder. PR-URL: nodejs/node#12570 Fixes: nodejs/node#12566 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Is it worth to set the option
parserOptions.sourceType
asmodule
in thelib/.eslintrc.yaml
? What are pros / cons / breaking changes?Why don't we use the option
root
astrue
in the main.eslintrc.yaml
?Would it spare the linter some fs churn / time?
cc @not-an-aardvark, @silverwind, @Trott
The text was updated successfully, but these errors were encountered: