Skip to content

Commit ebb19c6

Browse files
committed
fix
1 parent 4223ca7 commit ebb19c6

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

Diff for: tools/update-fixtures.ts

+11-15
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from "../tests/src/parser/test-utils";
1515
import type ts from "typescript";
1616
import type ESTree from "estree";
17+
import globals from "globals";
1718
import type { SourceLocation } from "../src/ast";
1819

1920
const 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-
203199
function buildTypes(
204200
input: string,
205201
result: {

0 commit comments

Comments
 (0)