Skip to content

Commit

Permalink
fix: svelte parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
vtrbo committed Sep 15, 2023
1 parent 1280ae0 commit a971e8d
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions packages/eslint-config-svelte/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,14 @@ const TS = isPackageExists('typescript')
module.exports = !SVELTE
? {}
: defineConfig({
overrides: [
{
files: ['*.svelte'],
parser: TS ? '@typescript-eslint/parser' : 'svelte-eslint-parser',
plugins: TS ? ['@typescript-eslint'] : [],
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
],
extends: [
TS
? '@vtrbo/eslint-config-ts'
: '@vtrbo/eslint-config-basic',
TS
? 'plugin:@typescript-eslint/recommended'
: {},
'plugin:svelte/recommended',
TS
? '@vtrbo/eslint-config-ts'
: '@vtrbo/eslint-config-basic',
],
parserOptions: {
sourceType: 'module',
Expand All @@ -36,6 +26,18 @@ module.exports = !SVELTE
es2017: true,
node: true,
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
plugins: TS ? ['@typescript-eslint'] : [],
parserOptions: TS
? {
parser: '@typescript-eslint/parser',
}
: {},
},
],
rules: {
'@typescript-eslint/nk-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
Expand Down

0 comments on commit a971e8d

Please sign in to comment.