Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Nov 30, 2024
1 parent 4223ca7 commit ebb19c6
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions tools/update-fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from "../tests/src/parser/test-utils";
import type ts from "typescript";
import type ESTree from "estree";
import globals from "globals";
import type { SourceLocation } from "../src/ast";

const ERROR_FIXTURE_ROOT = path.resolve(
Expand Down Expand Up @@ -88,21 +89,24 @@ for (const {
throw e;
}

const linter = createLinter();
const linter = new Linter();
for (const rule of RULES) {
const ruleOutputFileName = getRuleOutputFileName(rule);
const messages = linter.verify(
input,
{
parser: "svelte-eslint-parser",
parserOptions: generateParserOptions(config),
files: ["**"],
languageOptions: {
parser,
parserOptions: generateParserOptions(config),
globals: {
...globals.browser,
...globals.es2021,
},
},
rules: {
[rule]: "error",
},
env: {
browser: true,
es2021: true,
},
},
inputFileName,
);
Expand Down Expand Up @@ -192,14 +196,6 @@ for (const {
);
}

function createLinter() {
const linter = new Linter();

linter.defineParser("svelte-eslint-parser", parser as any);

return linter;
}

function buildTypes(
input: string,
result: {
Expand Down

0 comments on commit ebb19c6

Please sign in to comment.