@@ -118,7 +118,6 @@ interface Config {
118118 *
119119 * If `true`:
120120 * - Column offsets in diagnostics are incremented by 1.
121- * - Fixes which are adjacent to each other are considered overlapping, and only the first fix is applied.
122121 * - Defaults `sourceType` to "module" if not provided (otherwise default is "unambiguous").
123122 * - Disallows `sourceType: "unambiguous"`.
124123 * - Allows `null` as property value for `globals`.
@@ -674,9 +673,7 @@ function assertInvalidTestCasePasses(test: InvalidTestCase, plugin: Plugin, conf
674673
675674 // Test output after fixes
676675 const { code } = test ;
677- const eslintCompat = test . eslintCompat === true ;
678-
679- let fixedCode = runFixes ( diagnostics , code , eslintCompat ) ;
676+ let fixedCode = runFixes ( diagnostics , code ) ;
680677 if ( fixedCode === null ) fixedCode = code ;
681678
682679 // Re-lint and re-fix for additional passes if `recursive` option used
@@ -687,7 +684,7 @@ function assertInvalidTestCasePasses(test: InvalidTestCase, plugin: Plugin, conf
687684 if ( extraPassCount > 0 && fixedCode !== code ) {
688685 for ( let pass = 0 ; pass < extraPassCount ; pass ++ ) {
689686 const diagnostics = lint ( { ...test , code : fixedCode } , plugin ) ;
690- const newFixedCode = runFixes ( diagnostics , fixedCode , eslintCompat ) ;
687+ const newFixedCode = runFixes ( diagnostics , fixedCode ) ;
691688 if ( newFixedCode === null ) break ;
692689 fixedCode = newFixedCode ;
693690 }
@@ -719,14 +716,14 @@ function assertInvalidTestCasePasses(test: InvalidTestCase, plugin: Plugin, conf
719716 * @returns Fixed code, or `null` if no fixes to apply
720717 * @throws {Error } If error when applying fixes
721718 */
722- function runFixes ( diagnostics : Diagnostic [ ] , code : string , eslintCompat : boolean ) : string | null {
719+ function runFixes ( diagnostics : Diagnostic [ ] , code : string ) : string | null {
723720 const fixGroups : FixReport [ ] [ ] = [ ] ;
724721 for ( const diagnostic of diagnostics ) {
725722 if ( diagnostic . fixes !== null ) fixGroups . push ( diagnostic . fixes ) ;
726723 }
727724 if ( fixGroups . length === 0 ) return null ;
728725
729- const fixedCode = applyFixes ( code , JSON . stringify ( fixGroups ) , eslintCompat ) ;
726+ const fixedCode = applyFixes ( code , JSON . stringify ( fixGroups ) ) ;
730727 if ( fixedCode === null ) throw new Error ( "Failed to apply fixes" ) ;
731728
732729 return fixedCode ;
@@ -936,8 +933,6 @@ function assertSuggestionsAreCorrect(
936933 `Instead found ${ actualSuggestions . length } suggestion${ actualSuggestions . length > 1 ? "s" : "" } .` ,
937934 ) ;
938935
939- const eslintCompat = test . eslintCompat === true ;
940-
941936 for ( let i = 0 ; i < expectedSuggestions . length ; i ++ ) {
942937 const actual = actualSuggestions [ i ] ! ;
943938 const expected = expectedSuggestions [ i ] ! ;
@@ -949,7 +944,7 @@ function assertSuggestionsAreCorrect(
949944 // Validate output
950945 assert ( Object . hasOwn ( expected , "output" ) , `${ prefix } : \`output\` property is required` ) ;
951946
952- const suggestedCode = applyFixes ( test . code , JSON . stringify ( [ actual . fixes ] ) , eslintCompat ) ;
947+ const suggestedCode = applyFixes ( test . code , JSON . stringify ( [ actual . fixes ] ) ) ;
953948 assert ( suggestedCode !== null , `${ prefix } : Failed to apply suggestion fix` ) ;
954949
955950 assert . strictEqual (
0 commit comments