Skip to content

fix: ignore all node_modules and .git dirs by default #5204

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jedwards1211
Copy link

@jedwards1211 jedwards1211 commented Aug 29, 2024

PR Checklist

Overview

Just adds **/ before the default ignore patterns so that all node_modules and .git dirs get ignored, not just ones in the root folder.

@JoshuaKGoldberg
Copy link
Member

Putting in draft per #5203 (comment). Sorry for being misleading!

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft August 29, 2024 03:34
@JoshuaKGoldberg JoshuaKGoldberg added the semver-major implementation requires increase of "major" version number; "breaking changes" label Jan 2, 2025
@voxpelli voxpelli requested a review from Copilot June 12, 2025 07:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the default watch-ignore patterns to recursively ignore all node_modules and .git directories, not just those at the root.

  • Updated "watch-ignore" in lib/mocharc.json to use "/node_modules" and "/.git".
  • Ensures that file watchers effectively skip these directories regardless of their location.
Comments suppressed due to low confidence (1)

lib/mocharc.json:9

  • Consider verifying that the recursive '**/' pattern does not ignore directories that should remain watched (e.g., for debugging or testing purposes). If necessary, update the documentation to clearly communicate the change in behavior.
"watch-ignore": ["**/node_modules", "**/.git"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major implementation requires increase of "major" version number; "breaking changes"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature: Change default value for --watch-ignore to **/node_modules, **/.git
2 participants