Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

eslint.config.js

26 lines700 Bytes

1// @ts-check
2​
3import tsParser from '@typescript-eslint/parser'
4import pluginSvelte from 'eslint-plugin-svelte'
5import { defineConfig } from 'eslint/config'
6​
7// Only the Svelte rules, which need the component template; everything else is linted by Oxlint
8export default defineConfig([
9 ...pluginSvelte.configs['recommended'],
10 {
11 files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
12 languageOptions: {
13 parserOptions: {
14 parser: tsParser,
15 extraFileExtensions: ['.svelte'],
16 },
17 },
18 },
19 {
20 rules: {
21 'svelte/block-lang': ['error', { script: ['ts'] }],
22 'svelte/no-svelte-internal': 'error',
23 'svelte/valid-compile': 'off',
24 },
25 },
26])