Skip to content
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

Merged
merged 3 commits into from Apr 5, 2024
Merged

feat: Add --inspect-config CLI flag #18270

merged 3 commits into from Apr 5, 2024

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Apr 4, 2024

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?

@nzakas nzakas requested a review from a team as a code owner April 4, 2024 22:15
@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label Apr 4, 2024
@github-actions github-actions bot added the cli Relates to ESLint's command-line interface label Apr 4, 2024
Copy link

netlify bot commented Apr 4, 2024

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 5c0a8fc
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/66105a1589bcf100083cbc67

fasttime
fasttime previously approved these changes Apr 5, 2024
Copy link
Member

@fasttime fasttime left a 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.

Comment on lines -70 to -73
--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
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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.

Copy link
Member Author

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.

tests/lib/options.js Outdated Show resolved Hide resolved
@fasttime fasttime added the accepted There is consensus among the team that this change meets the criteria for inclusion label Apr 5, 2024
Co-authored-by: Francesco Trotta <github@fasttime.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion cli Relates to ESLint's command-line interface feature This change adds a new feature to ESLint
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Change Request: --inspect-config CLI option
2 participants