File tree 1 file changed +11
-15
lines changed
1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
14
14
} from "../tests/src/parser/test-utils" ;
15
15
import type ts from "typescript" ;
16
16
import type ESTree from "estree" ;
17
+ import globals from "globals" ;
17
18
import type { SourceLocation } from "../src/ast" ;
18
19
19
20
const ERROR_FIXTURE_ROOT = path . resolve (
@@ -88,21 +89,24 @@ for (const {
88
89
throw e ;
89
90
}
90
91
91
- const linter = createLinter ( ) ;
92
+ const linter = new Linter ( ) ;
92
93
for ( const rule of RULES ) {
93
94
const ruleOutputFileName = getRuleOutputFileName ( rule ) ;
94
95
const messages = linter . verify (
95
96
input ,
96
97
{
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
+ } ,
99
107
rules : {
100
108
[ rule ] : "error" ,
101
109
} ,
102
- env : {
103
- browser : true ,
104
- es2021 : true ,
105
- } ,
106
110
} ,
107
111
inputFileName ,
108
112
) ;
@@ -192,14 +196,6 @@ for (const {
192
196
) ;
193
197
}
194
198
195
- function createLinter ( ) {
196
- const linter = new Linter ( ) ;
197
-
198
- linter . defineParser ( "svelte-eslint-parser" , parser as any ) ;
199
-
200
- return linter ;
201
- }
202
-
203
199
function buildTypes (
204
200
input : string ,
205
201
result : {
You can’t perform that action at this time.
0 commit comments