tests
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import js from '@eslint/js';
|
||||
import ts from 'typescript-eslint';
|
||||
import svelte from 'eslint-plugin-svelte';
|
||||
import globals from 'globals';
|
||||
|
||||
export default ts.config(
|
||||
// Never lint generated / vendored output.
|
||||
{
|
||||
ignores: ['build/', '.svelte-kit/', 'node_modules/', 'dist/', 'static/']
|
||||
},
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommended,
|
||||
...svelte.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: { ...globals.browser, ...globals.node }
|
||||
}
|
||||
},
|
||||
{
|
||||
// Svelte files parse <script lang="ts"> blocks with the TS parser.
|
||||
files: ['**/*.svelte', '**/*.svelte.ts'],
|
||||
languageOptions: {
|
||||
parserOptions: { parser: ts.parser }
|
||||
}
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||
// This project links/navigates with plain hrefs and goto(path); we don't
|
||||
// use the resolve() route helper. Off rather than churn every link.
|
||||
'svelte/no-navigation-without-resolve': 'off',
|
||||
// Nice-to-have, not worth failing the build over for static lists.
|
||||
'svelte/require-each-key': 'warn',
|
||||
// `svelte-ignore` comments target svelte-check (a11y), which eslint can't
|
||||
// see — so it wrongly reports them as unused.
|
||||
'svelte/no-unused-svelte-ignore': 'off'
|
||||
}
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user