Skip to content

Commit 6e60cc0

Browse files
committed
try to fix
1 parent e1a4d15 commit 6e60cc0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/parser/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ export function parseForESLint(code: string, options?: any): ParseResult {
118118

119119
if (
120120
parserOptions.filePath &&
121-
(parserOptions.filePath.endsWith(".svelte.js") ||
122-
parserOptions.filePath.endsWith(".svelte.ts"))
121+
!parserOptions.filePath.endsWith(".svelte") &&
122+
// If no `filePath` is set in ESLint, "<input>" will be specified.
123+
parserOptions.filePath !== "<input>"
123124
) {
124125
const svelteParseContext =
125126
resolveSvelteParseContextForSvelteScript(svelteConfig);

0 commit comments

Comments
 (0)