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
feat: Add --inspect-config CLI flag #18270
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
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 a few notes, otherwise LGTM.
--no-eslintrc Disable use of configuration from .eslintrc.* | ||
-c, --config path::String Use this configuration, overriding .eslintrc.* config options if present | ||
--env [String] Specify environments | ||
--ext [String] Specify JavaScript file extensions |
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.
Is it intended that --no-eslintrc
, --env
and --ext
are no longer listed in this section, but still have dedicated paragraphs below?
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.
Yes. We are switching to show the default output everyone sees, but keeping the individual descriptions available so people can still look up the older options.
--fix Automatically fix problems | ||
--fix-dry-run Automatically fix problems without saving the changes to the file system | ||
--fix-type Array Specify the types of fixes to apply (directive, problem, suggestion, layout) | ||
|
||
Ignore files: | ||
--ignore-path path::String Specify path of ignore file |
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.
--ignore-path
still has a paragraph below.
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.
Yup, that's because it's still valid in eslintrc mode.
Co-authored-by: Francesco Trotta <github@fasttime.org>
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
[x] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
Added the
--inspect-config
CLI flag only in flat config mode. I also updated the docs and relevant tests.I updated the CLI docs to use the flag config output.
It looks like we don't have any real tests for the functionality like
--init
, so I opted not to add any for this either.fixes #18255
Is there anything you'd like reviewers to focus on?