File tree Expand file tree Collapse file tree 5 files changed +10
-19
lines changed Expand file tree Collapse file tree 5 files changed +10
-19
lines changed Original file line number Diff line number Diff line change 9
9
// Requirements
10
10
//-----------------------------------------------------------------------------
11
11
12
- const { ConfigArray, ConfigArraySymbol } = require ( "@humanwhocodes /config-array" ) ;
12
+ const { ConfigArray, ConfigArraySymbol } = require ( "@eslint /config-array" ) ;
13
13
const { flatConfigSchema } = require ( "./flat-config-schema" ) ;
14
14
const { RuleValidator } = require ( "./rule-validator" ) ;
15
15
const { defaultConfig } = require ( "./default-config" ) ;
Original file line number Diff line number Diff line change @@ -335,23 +335,23 @@ async function globSearch({
335
335
336
336
/*
337
337
* We updated the unmatched patterns set only if the path
338
- * matches and the file isn't ignored . If the file is
339
- * ignored , that means there wasn't a match for the
338
+ * matches and the file has a config . If the file has no
339
+ * config , that means there wasn't a match for the
340
340
* pattern so it should not be removed.
341
341
*
342
- * Performance note: isFileIgnored() aggressively caches
342
+ * Performance note: `getConfig()` aggressively caches
343
343
* results so there is no performance penalty for calling
344
- * it twice with the same argument.
344
+ * it multiple times with the same argument.
345
345
*/
346
- if ( pathMatches && ! configs . isFileIgnored ( entry . path ) ) {
346
+ if ( pathMatches && configs . getConfig ( entry . path ) ) {
347
347
unmatchedPatterns . delete ( matcher . pattern ) ;
348
348
}
349
349
350
350
return pathMatches || previousValue ;
351
351
} , false )
352
352
: matchers . some ( matcher => matcher . match ( relativePath ) ) ;
353
353
354
- return matchesPattern && ! configs . isFileIgnored ( entry . path ) ;
354
+ return matchesPattern && configs . getConfig ( entry . path ) !== void 0 ;
355
355
} )
356
356
} ,
357
357
( error , entries ) => {
@@ -545,7 +545,7 @@ async function findFiles({
545
545
if ( stat . isFile ( ) ) {
546
546
results . push ( {
547
547
filePath,
548
- ignored : configs . isFileIgnored ( filePath )
548
+ ignored : ! configs . getConfig ( filePath )
549
549
} ) ;
550
550
}
551
551
Original file line number Diff line number Diff line change @@ -881,15 +881,6 @@ class ESLint {
881
881
882
882
const config = configs . getConfig ( filePath ) ;
883
883
884
- /*
885
- * Sometimes a file found through a glob pattern will
886
- * be ignored. In this case, `config` will be undefined
887
- * and we just silently ignore the file.
888
- */
889
- if ( ! config ) {
890
- return void 0 ;
891
- }
892
-
893
884
// Skip if there is cached result.
894
885
if ( lintResultCache ) {
895
886
const cachedResult =
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ const ajv = require("../shared/ajv")({ strictDefaults: true });
28
28
29
29
const parserSymbol = Symbol . for ( "eslint.RuleTester.parser" ) ;
30
30
const { SourceCode } = require ( "../source-code" ) ;
31
- const { ConfigArraySymbol } = require ( "@humanwhocodes /config-array" ) ;
31
+ const { ConfigArraySymbol } = require ( "@eslint /config-array" ) ;
32
32
const { isSerializable } = require ( "../shared/serialization" ) ;
33
33
34
34
//------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 68
68
"dependencies" : {
69
69
"@eslint-community/eslint-utils" : " ^4.2.0" ,
70
70
"@eslint-community/regexpp" : " ^4.6.1" ,
71
+ "@eslint/config-array" : " ^0.15.1" ,
71
72
"@eslint/eslintrc" : " ^3.1.0" ,
72
73
"@eslint/js" : " 9.3.0" ,
73
- "@humanwhocodes/config-array" : " ^0.13.0" ,
74
74
"@humanwhocodes/module-importer" : " ^1.0.1" ,
75
75
"@humanwhocodes/retry" : " ^0.3.0" ,
76
76
"@nodelib/fs.walk" : " ^1.2.8" ,
You can’t perform that action at this time.
0 commit comments