File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414} from "../tests/src/parser/test-utils" ;
1515import type ts from "typescript" ;
1616import type ESTree from "estree" ;
17+ import globals from "globals" ;
1718import type { SourceLocation } from "../src/ast" ;
1819
1920const ERROR_FIXTURE_ROOT = path . resolve (
@@ -88,21 +89,24 @@ for (const {
8889 throw e ;
8990 }
9091
91- const linter = createLinter ( ) ;
92+ const linter = new Linter ( ) ;
9293 for ( const rule of RULES ) {
9394 const ruleOutputFileName = getRuleOutputFileName ( rule ) ;
9495 const messages = linter . verify (
9596 input ,
9697 {
97- parser : "svelte-eslint-parser" ,
98- parserOptions : generateParserOptions ( config ) ,
98+ files : [ "**" ] ,
99+ languageOptions : {
100+ parser,
101+ parserOptions : generateParserOptions ( config ) ,
102+ globals : {
103+ ...globals . browser ,
104+ ...globals . es2021 ,
105+ } ,
106+ } ,
99107 rules : {
100108 [ rule ] : "error" ,
101109 } ,
102- env : {
103- browser : true ,
104- es2021 : true ,
105- } ,
106110 } ,
107111 inputFileName ,
108112 ) ;
@@ -192,14 +196,6 @@ for (const {
192196 ) ;
193197}
194198
195- function createLinter ( ) {
196- const linter = new Linter ( ) ;
197-
198- linter . defineParser ( "svelte-eslint-parser" , parser as any ) ;
199-
200- return linter ;
201- }
202-
203199function buildTypes (
204200 input : string ,
205201 result : {
You can’t perform that action at this time.
0 commit comments