@@ -928,6 +928,7 @@ describe("ESLint", () => {
928
928
929
929
it ( "should throw if eslint.config.js file is not present even if overrideConfig was passed" , async ( ) => {
930
930
eslint = new ESLint ( {
931
+ flags,
931
932
cwd : getFixturePath ( ".." ) ,
932
933
overrideConfig : {
933
934
rules : {
@@ -1525,26 +1526,28 @@ describe("ESLint", () => {
1525
1526
1526
1527
it ( "should throw if eslint.config.js file is not present even if overrideConfig was passed" , async ( ) => {
1527
1528
eslint = new ESLint ( {
1529
+ flags,
1528
1530
cwd : getFixturePath ( ".." ) ,
1529
1531
overrideConfig : {
1530
1532
rules : {
1531
1533
"no-unused-vars" : 2
1532
1534
}
1533
1535
}
1534
1536
} ) ;
1535
- await assert . rejects ( ( ) => eslint . lintFiles ( "fixtures/undef *.js" ) , / C o u l d n o t f i n d c o n f i g f i l e / u) ;
1537
+ await assert . rejects ( ( ) => eslint . lintFiles ( "no-config/no-config-file/ *.js" ) , / C o u l d n o t f i n d c o n f i g f i l e / u) ;
1536
1538
} ) ;
1537
1539
1538
1540
it ( "should throw if eslint.config.js file is not present even if overrideConfig was passed and a file path is given" , async ( ) => {
1539
1541
eslint = new ESLint ( {
1542
+ flags,
1540
1543
cwd : getFixturePath ( ".." ) ,
1541
1544
overrideConfig : {
1542
1545
rules : {
1543
1546
"no-unused-vars" : 2
1544
1547
}
1545
1548
}
1546
1549
} ) ;
1547
- await assert . rejects ( ( ) => eslint . lintFiles ( "fixtures/undef .js" ) , / C o u l d n o t f i n d c o n f i g f i l e / u) ;
1550
+ await assert . rejects ( ( ) => eslint . lintFiles ( "no-config/no-config-file/foo .js" ) , / C o u l d n o t f i n d c o n f i g f i l e / u) ;
1548
1551
} ) ;
1549
1552
1550
1553
it ( "should not throw if eslint.config.js file is not present and overrideConfigFile is `true`" , async ( ) => {
@@ -4643,7 +4646,7 @@ describe("ESLint", () => {
4643
4646
} ) ;
4644
4647
} ) ;
4645
4648
4646
- it ( "should throw if non-boolean value is given to 'options.warnIgnored' option " , async ( ) => {
4649
+ it ( "should throw if an invalid value is given to 'patterns' argument " , async ( ) => {
4647
4650
eslint = new ESLint ( { flags } ) ;
4648
4651
await assert . rejects ( ( ) => eslint . lintFiles ( 777 ) , / ' p a t t e r n s ' m u s t b e a n o n - e m p t y s t r i n g o r a n a r r a y o f n o n - e m p t y s t r i n g s / u) ;
4649
4652
await assert . rejects ( ( ) => eslint . lintFiles ( [ null ] ) , / ' p a t t e r n s ' m u s t b e a n o n - e m p t y s t r i n g o r a n a r r a y o f n o n - e m p t y s t r i n g s / u) ;
@@ -5955,20 +5958,6 @@ describe("ESLint", () => {
5955
5958
assert . strictEqual ( results [ 0 ] . output , void 0 ) ;
5956
5959
} ) ;
5957
5960
5958
- it ( "should not fix any rules when fixTypes is used without fix" , async ( ) => {
5959
- eslint = new ESLint ( {
5960
- flags,
5961
- cwd : path . join ( fixtureDir , ".." ) ,
5962
- overrideConfigFile : true ,
5963
- fix : false ,
5964
- fixTypes : [ "layout" ]
5965
- } ) ;
5966
- const inputPath = getFixturePath ( "fix-types/fix-only-semi.js" ) ;
5967
- const results = await eslint . lintFiles ( [ inputPath ] ) ;
5968
-
5969
- assert . strictEqual ( results [ 0 ] . output , void 0 ) ;
5970
- } ) ;
5971
-
5972
5961
it ( "should not fix non-style rules when fixTypes has only 'layout'" , async ( ) => {
5973
5962
eslint = new ESLint ( {
5974
5963
flags,
0 commit comments