File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed 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
+ "@eslint/config-array" : " ^0.16.0 " ,
72
72
"@eslint/eslintrc" : " ^3.1.0" ,
73
73
"@eslint/js" : " 9.4.0" ,
74
74
"@humanwhocodes/module-importer" : " ^1.0.1" ,
Original file line number Diff
C400
line number Diff line change @@ -1305,6 +1305,22 @@ describe("ESLint", () => {
1305
1305
assert . strictEqual ( results [ 0 ] . suppressedMessages . length , 0 ) ;
1306
1306
} ) ;
1307
1307
1308
+ // https://github.com/eslint/eslint/issues/18550
1309
+ it ( "should skip files with non-standard extensions when they're matched only by a '*' files pattern" , async ( ) => {
1310
+ eslint = new ESLint ( {
1311
+ cwd : getFixturePath ( "files" ) ,
1312
+ overrideConfig : { files : [ "*" ] } ,
1313
+ overrideConfigFile : true
1314
+ } ) ;
1315
+ const results = await eslint . lintFiles ( [ "." ] ) ;
1316
+
1317
+ assert . strictEqual ( results . length , 2 ) ;
1318
+ assert (
1319
+ results . every ( result => / ^ \. [ c m ] ? j s $ / u. test ( path . extname ( result . filePath ) ) ) ,
1320
+ "File with a non-standard extension was linted"
1321
+ ) ;
1322
+ } ) ;
1323
+
1308
1324
// https://github.com/eslint/eslint/issues/16413
1309
1325
it ( "should find files and report zero messages when given a parent directory with a .js" , async ( ) => {
1310
1326
eslint = new ESLint ( {
You can’t perform that action at this time.
0 commit comments