-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Warn when broad glob patterns are used in the content configuration #14140
Merged
+300
−9
Commits on Aug 7, 2024
-
show a warning when detecting broad glob patterns
We will show a warning if all of these conditions are true: 1. We detect `**` in the glob pattern 2. _and_ you didn't explicitly use `node_modules` in the glob pattern 3. _and_ we found files that include `node_modules` in the file path 4. _and_ no other globs exist that explicitly match the found file With these rules in place, the DX has nice trade-offs: 1. Very simple projects (that don't even have a `node_modules` folder), can simply use `./**/*` because while resolving actual files we won't see files from `node_modules` and thus won't warn. 2. If you use `./src/**` and you do have a `node_modules`, then we also won't complain (unless you have a `node_modules` folder in the `./src` folder). 3. If you work with a 3rd party library that you want to make changes to. Using an explicit match like `./node_modules/my-package/**/*` is allowed because `node_modules` is explicitly mentioned. Note: this only shows a warning, it does not stop the process entirely. The warning will be show when the very first file in the `node_modules` is detected.
Configuration menu - View commit details
-
Copy full SHA for 59723fb - Browse repository at this point
Copy the full SHA 59723fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for ef54703 - Browse repository at this point
Copy the full SHA ef54703View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89a55e3 - Browse repository at this point
Copy the full SHA 89a55e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09b69c6 - Browse repository at this point
Copy the full SHA 09b69c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5eeb52 - Browse repository at this point
Copy the full SHA e5eeb52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28d911e - Browse repository at this point
Copy the full SHA 28d911eView commit details -
+ use the actual glob/file that is causing issues
Configuration menu - View commit details
-
Copy full SHA for 8be2483 - Browse repository at this point
Copy the full SHA 8be2483View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d7e4aa - Browse repository at this point
Copy the full SHA 2d7e4aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b1865b9 - Browse repository at this point
Copy the full SHA b1865b9View commit details -
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f5c8b51 - Browse repository at this point
Copy the full SHA f5c8b51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c0006f - Browse repository at this point
Copy the full SHA 9c0006fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a9202fb - Browse repository at this point
Copy the full SHA a9202fbView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.