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
fix: Correct ignore message for "node_modules" subfolders #17217
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for docs-eslint canceled.
|
mdjermanovic
added
accepted
There is consensus among the team that this change meets the criteria for inclusion
core
Relates to ESLint's core APIs and features
labels
May 24, 2023
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
mdjermanovic
approved these changes
May 24, 2023
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.
LGTM, thanks!
crapStone
pushed a commit
to Calciumdibromid/CaBr2
that referenced
this pull request
Jun 8, 2023
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | minor | [`8.41.0` -> `8.42.0`](https://renovatebot.com/diffs/npm/eslint/8.41.0/8.42.0) | --- ### Release Notes <details> <summary>eslint/eslint</summary> ### [`v8.42.0`](https://github.com/eslint/eslint/releases/tag/v8.42.0) [Compare Source](eslint/eslint@v8.41.0...v8.42.0) #### Features - [`b8448ff`](eslint/eslint@b8448ff) feat: correct no-useless-return behaviour in try statements ([#​16996](eslint/eslint#16996)) (Nitin Kumar) #### Bug Fixes - [`a589636`](eslint/eslint@a589636) fix: Config with `ignores` and without `files` should not always apply ([#​17181](eslint/eslint#17181)) (Milos Djermanovic) - [`c4fad17`](eslint/eslint@c4fad17) fix: Correct ignore message for "node_modules" subfolders ([#​17217](eslint/eslint#17217)) (Francesco Trotta) #### Documentation - [`01d7142`](eslint/eslint@01d7142) docs: Update README (GitHub Actions Bot) - [`e5182b7`](eslint/eslint@e5182b7) docs: Update README (GitHub Actions Bot) #### Chores - [`6ca5b7c`](eslint/eslint@6ca5b7c) chore: upgrade [@​eslint/js](https://github.com/eslint/js)[@​8](https://github.com/8).42.0 ([#​17236](eslint/eslint#17236)) (Milos Djermanovic) - [`67fc5e7`](eslint/eslint@67fc5e7) chore: package.json update for [@​eslint/js](https://github.com/eslint/js) release (ESLint Jenkins) - [`0892412`](eslint/eslint@0892412) refactor: remove `Identifier` listener in no-irregular-whitespace ([#​17235](eslint/eslint#17235)) (Milos Djermanovic) - [`f67d298`](eslint/eslint@f67d298) test: Add `FlatESLint` tests with missing config files ([#​17164](eslint/eslint#17164)) (Milos Djermanovic) - [`5b68d51`](eslint/eslint@5b68d51) chore: Fix `fixedsize` attribute in code path analysis DOT debug output ([#​17202](eslint/eslint#17202)) (Milos Djermanovic) - [`37432f2`](eslint/eslint@37432f2) chore: update descriptions in key-spacing tests ([#​17195](eslint/eslint#17195)) (Milos Djermanovic) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTMuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMy4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1923 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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 21, 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
bug
ESLint is working incorrectly
core
Relates to ESLint's core APIs and features
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.
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
Tell us about your environment (
npx eslint --env-info
):Node version: v18.16.0
npm version: v9.5.1
Local ESLint version: v8.41.0 (Currently used)
Global ESLint version: Not found
Operating System: darwin 22.2.0
What parser are you using (place an "X" next to just one item)?
none
Please show your full configuration:
no configuration
What did you do? Please include the actual source code causing the issue.
In a terminal, I set the environment variable
ESLINT_USE_FLAT_CONFIG="true"
. Then I ran:cd .. node eslint/bin/eslint.js --no-config-lookup eslint/node_modules/espree/espree.js
What did you expect to happen?
A warning message suggesting to use the ignore pattern
"!**/node_modules/"
to unignore the provided file.What actually happened? Please include the actual, raw output from ESLint.
The warning message suggests to use the CLI option
--no-ignore
, but that doesn't work to unignore predefined ignore patterns.In fact, re-running with the
--no-ignore
option produces the same output.What changes did you make? (Give an overview)
I updated the logic that decides which warning message should be printed when an ignored file is reported. There is already a message that fits the case of an ignored file under
node_modules
:eslint/lib/eslint/eslint-helpers.js
Line 597 in 9b62ae0
After my change, this message will be reported for all files under
node_modules
folders, not just when thenode_modules
folder is located in the working directory. This also fixes an incorrect match for files whose name starts with"node_modules"
.Is there anything you'd like reviewers to focus on?