-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
fix: Improve config error messages #18457
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
@@ -11,15 +11,21 @@ Flat config uses "languageOptions.globals" to define global variables for your f | |||
|
|||
Please see the following page for information on how to convert your config object into the correct format: | |||
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options | |||
|
|||
If you're not using "env" directly (it may be coming from a plugin), please see the following: |
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're not using "env" directly (it may be coming from a plugin), please see the following: | |
If "env" is not used directly (it may be coming from a shared config or plugin), please see the following: |
https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs | ||
|
||
If you're not using "extends" directly (it may be coming from a plugin), please see the following: |
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're not using "extends" directly (it may be coming from a plugin), please see the following: | |
If "extends" is not used directly (it may be coming from a shared config or plugin), please see the following: |
@@ -29,6 +35,9 @@ Flat config uses "languageOptions.globals" to define global variables for your f | |||
|
|||
Please see the following page for information on how to convert your config object into the correct format: | |||
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options | |||
|
|||
If you're not using "globals" directly (it may be coming from a plugin), please see the following: |
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're not using "globals" directly (it may be coming from a plugin), please see the following: | |
If "globals" is not used directly (it may be coming from a shared config or plugin), please see the following: |
@@ -38,6 +47,9 @@ Flat config uses "ignores" to specify files to ignore. | |||
|
|||
Please see the following page for information on how to convert your config object into the correct format: | |||
https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files | |||
|
|||
If you're not using "ignorePatterns" directly (it may be coming from a plugin), please see the following: |
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're not using "ignorePatterns" directly (it may be coming from a plugin), please see the following: | |
If "ignorePatterns" is not used directly (it may be coming from a shared config or plugin), please see the following: |
@@ -56,6 +68,9 @@ Flat config is an array that acts like the eslintrc "overrides" array. | |||
|
|||
Please see the following page for information on how to convert your config object into the correct format: | |||
https://eslint.org/docs/latest/use/configure/migration-guide#glob-based-configs | |||
|
|||
If you're not using "overrides" directly (it may be coming from a plugin), please see the following: |
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're not using "overrides" directly (it may be coming from a plugin), please see the following: | |
If "overrides" is not used directly (it may be coming from a shared config or plugin), please see the following: |
@@ -65,6 +80,9 @@ Flat config uses "languageOptions.parser" to override the default parser. | |||
|
|||
Please see the following page for information on how to convert your config object into the correct format: | |||
https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsers | |||
|
|||
If you're not using "parser" directly (it may be coming from a plugin), please see the following: |
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're not using "parser" directly (it may be coming from a plugin), please see the following: | |
If "parser" is not used directly (it may be coming from a shared config or plugin), please see the following: |
@@ -74,6 +92,9 @@ Flat config uses "languageOptions.parserOptions" to specify parser options. | |||
|
|||
Please see the following page for information on how to convert your config object into the correct format: | |||
https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options | |||
|
|||
If you're not using "parserOptions" directly (it may be coming from a plugin), please see the following: |
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're not using "parserOptions" directly (it may be coming from a plugin), please see the following: | |
If "parserOptions" is not used directly (it may be coming from a shared config or plugin), please see the following: |
@aladdin-add I don't understand why you're suggesting to change the wording in all of the messages. I purposely used "You" to make it clear to people that if they, personally, aren't using the key then it's probably coming from a plugin. |
well. I don't feel strong about the wording - just want to say it's also may be coming from a shared 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.
LGTM, thanks!
I'm merging this now for today's release, and we can discuss the wording in a follow-up.
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[x] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?