65 lines
2.1 KiB
JavaScript
65 lines
2.1 KiB
JavaScript
import js from '@eslint/js';
|
|
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
import prettier from 'eslint-config-prettier';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import globals from 'globals';
|
|
import ts from 'typescript-eslint';
|
|
import svelteConfig from './svelte.config.js';
|
|
|
|
export default defineConfig(
|
|
globalIgnores([
|
|
'**/node_modules/',
|
|
'.svelte-kit/',
|
|
'build/',
|
|
'data/',
|
|
'test-fixtures/',
|
|
'static/agent/',
|
|
'.claude/',
|
|
'.gstack/'
|
|
]),
|
|
js.configs.recommended,
|
|
ts.configs.recommended,
|
|
svelte.configs.recommended,
|
|
prettier,
|
|
svelte.configs.prettier,
|
|
{
|
|
// The controller is deployed at the origin root, including imperative navigation in TS.
|
|
rules: { 'svelte/no-navigation-without-resolve': 'off' }
|
|
},
|
|
{
|
|
languageOptions: {
|
|
globals: { ...globals.browser, ...globals.node }
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
ignoreRestSiblings: true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: ts.parser,
|
|
svelteConfig
|
|
}
|
|
},
|
|
rules: {
|
|
// Existing lists include intentionally positional rows and repeated primitive values.
|
|
'svelte/require-each-key': 'off',
|
|
// Local collection helpers do not need reactive replacements.
|
|
'svelte/prefer-svelte-reactivity': 'off',
|
|
// Preserve the existing state-reset behavior during tooling adoption.
|
|
'svelte/prefer-writable-derived': 'off',
|
|
// Explicit string interpolation preserves whitespace around inline controls and logs.
|
|
'svelte/no-useless-mustaches': 'off'
|
|
}
|
|
}
|
|
);
|