Skip to content

Commit

Permalink
fix: svelte eslint error
Browse files Browse the repository at this point in the history
  • Loading branch information
vtrbo committed Sep 9, 2023
1 parent e0c822f commit 8dc063b
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions packages/eslint-config-svelte/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,24 @@ module.exports = !SVELTE
? {}
: defineConfig({
overrides: [
TS
? {
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
},
rules: {
'no-unused-vars': 'off',
'no-undef': 'off',
...(TS ? { '@typescript-eslint/no-unused-vars': 'off' } : {}),
},
}
: {},
{
files: ['*.svelte'],
parser: TS ? '@typescript-eslint/parser' : 'svelte-eslint-parser',
plugins: TS ? ['@typescript-eslint'] : [],
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
],
extends: [
TS
? 'plugin:@typescript-eslint/recommended'
: {},
'plugin:svelte/recommended',
TS
? '@vtrbo/eslint-config-ts'
: '@vtrbo/eslint-config-basic',
TS ? 'plugin:@typescript-eslint/recommended' : {},
'plugin:svelte/recommended',
],
parser: TS ? '@typescript-eslint/parser' : '',
plugins: TS ? ['@typescript-eslint'] : [],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
Expand Down

0 comments on commit 8dc063b

Please sign in to comment.