Skip to content

Commit

Permalink
refactor: adjust loading on ts-parser for vue
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Aug 9, 2024
1 parent 6d08c20 commit 4af0b73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/configs/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function vue(
typeof import("eslint-merge-processors"),
];

const parserTs = await interopDefault(import("@typescript-eslint/parser")).catch(() => undefined);
const parserTs = typescript ? await interopDefault(import("@typescript-eslint/parser")) : undefined;

const stylisticEnforcement = stylistic === false ? "off" : "error";

Expand Down Expand Up @@ -104,7 +104,7 @@ export async function vue(
},
extraFileExtensions: [".vue"],
parser: typescript ? parserTs : null,
...(typescript ? parserOptions : {}),
...(typescript ? parserOptions : undefined),
sourceType: "module",
},
},
Expand Down

0 comments on commit 4af0b73

Please sign in to comment.