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: change default ignore pattern to **/node_modules/ in flat config #17184

Merged
merged 2 commits into from May 17, 2023

Conversation

mdjermanovic
Copy link
Member

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:

Fixes #17113

What changes did you make? (Give an overview)

Changed the default ignore pattern to **/node_modules/, updated tests, and added an example of how to unignore a directory in node_modules.

Is there anything you'd like reviewers to focus on?

@mdjermanovic mdjermanovic added core Relates to ESLint's core APIs and features accepted There is consensus among the team that this change meets the criteria for inclusion feature This change adds a new feature to ESLint labels May 15, 2023
@mdjermanovic mdjermanovic requested a review from a team as a code owner May 15, 2023 11:03
@netlify
Copy link

netlify bot commented May 15, 2023

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 69cee14
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/64647b3b45d57d00089bb274
😎 Deploy Preview https://deploy-preview-17184--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@fasttime
Copy link
Member

Thanks for this PR! I would recommend to also update this message, as it could be slightly misleading:

message = "File ignored by default. Use \"--ignore-pattern '!node_modules/*'\" to override.";

We could also simply point users to the documentation instead of suggesting to add CLI options (because IINM there is no guarantee that the CLI is being used here?).

@mdjermanovic
Copy link
Member Author

Thanks for this PR! I would recommend to also update this message, as it could be slightly misleading:

message = "File ignored by default. Use \"--ignore-pattern '!node_modules/*'\" to override.";

Good catch! Updated in 3fa6c92.

We could also simply point users to the documentation instead of suggesting to add CLI options (because IINM there is no guarantee that the CLI is being used here?).

Since we can't know at this point how is eslint being used and whether the pattern should be added in a config file or CLI command or perhaps in a configuration for a third-party tool, I changed "ignore-pattern" to generic "ignore pattern".

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.

LGTM!

@mdjermanovic
Copy link
Member Author

Rebased to fix merge conflicts.

@mdjermanovic mdjermanovic merged commit 880a431 into main May 17, 2023
22 checks passed
@mdjermanovic mdjermanovic deleted the issue17113 branch May 17, 2023 07:25
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Nov 14, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features feature This change adds a new feature to ESLint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change Request: Faster node_modules ignore by default
2 participants