Repository navigation
[Fix] no-extraneous-dependencies: match dependency globs inside dot directories - #3314
Open
Yurii201811 wants to merge 2 commits into
Open
Yurii201811 wants to merge 2 commits into
Yurii201811 wants to merge 2 commits into
Conversation
… directories Closes import-js#3311
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3314 +/- ##
=======================================
Coverage 79.59% 79.59%
=======================================
Files 98 98
Lines 4549 4549
Branches 1543 1575 +32
=======================================
Hits 3621 3621
Misses 928 928 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…re on old Node
CI threw ENOENT from `fs.mkdirSync(path, { recursive: true })` at `tests/src/rules/no-extraneous-dependencies.js:41` on Node v8.17.0 and Node v9.11.2. `fs.mkdtempSync` had already created the temp directory, and those versions ignore the options object. `fs.mkdtempSync` is absent on Node 4, and that major is red too. I added `makeTempDir` and `mkdirpSync`, which call `fs.mkdirSync` one directory at a time.
On Node v25.4.0, `npm run mocha -- tests/src/rules/no-extraneous-dependencies.js` passed 134 tests, and `ESLINT_USE_FLAT_CONFIG=false npx eslint` on that file passed. `git diff --check` passed. I did not rerun the full matrix.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I changed
testConfiginsrc/rules/no-extraneous-dependencies.jsso dependency globs pass{ dot: true }tominimatch. A file under.worktrees/failed**/libs/**/*.tsbecause**skips a directory whose name starts with a dot.src/core/listFilesWithNodeFs.jsalready matches that way.Closes #3311
How Has This Been Tested?
On Node v25.4.0, with minimatch 3.1.5 and ESLint 8.57.1, the three new valid cases failed before the change (131 passing, 3 failing). After it:
npm run mocha -- tests/src/rules/no-extraneous-dependencies.jspassed, 134 tests.npm testpassed, 3148 tests, theneslint .,eslint-doc-generator --check, andmarkdownlint "**/*.md".git diff --checkpassed.I did not run the ESLint 8/9/10 matrix,
npm run test-compiled, or the example package lints. The new fixture was not checked on Windows. The changelog cites issue #3311. This pull request had no number when that line was written.Prepared with Cursor assistance.