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