All checks were successful
Release / release (push) Successful in 5m24s
52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
import js from '@eslint/js';
|
|
import ts from 'typescript-eslint';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import globals from 'globals';
|
|
import svelteParser from 'svelte-eslint-parser';
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
...svelte.configs['flat/recommended'],
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.svelte', '**/*.svelte.ts'],
|
|
languageOptions: {
|
|
parser: svelteParser,
|
|
parserOptions: {
|
|
parser: ts.parser,
|
|
extraFileExtensions: ['.svelte']
|
|
}
|
|
}
|
|
},
|
|
{
|
|
ignores: ['build/', '.svelte-kit/', 'dist/']
|
|
},
|
|
{
|
|
rules: {
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_'
|
|
}
|
|
],
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'svelte/no-at-html-tags': 'error', // Catch XSS sinks
|
|
'svelte/require-each-key': 'warn',
|
|
'svelte/no-navigation-without-resolve': 'off', // Noisy
|
|
'svelte/no-useless-children-snippet': 'warn'
|
|
}
|
|
}
|
|
];
|