Skip to content

Commit

Permalink
Fix Svelte TS rules usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Feb 19, 2025
1 parent eedd9ae commit bd940ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions svelte.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import tseslint from 'typescript-eslint'

import ts from './ts.js'

let tsRules = ts.find(
config => config.files && config.files.includes('**/*.ts')
).rules
let tsRules = {}
for (let config of ts.filter(i => i.files && i.files.includes('**/*.ts'))) {
tsRules = { ...tsRules, ...config.rules }
}

export default [
{
Expand Down Expand Up @@ -38,7 +39,6 @@ export default [
'import/first': 'off',
'no-undef-init': 'off',
'no-use-before-define': 'off',
'prefer-const': 'off',
'svelte/block-lang': ['error', { script: 'ts' }],
'svelte/infinite-reactive-loop': 'error',
'svelte/no-at-debug-tags': 'error',
Expand Down

0 comments on commit bd940ac

Please sign in to comment.