mirror of
https://github.com/Blah-IM/Weblah.git
synced 2025-04-30 16:21:09 +00:00
43 lines
901 B
JavaScript
43 lines
901 B
JavaScript
import js from '@eslint/js';
|
|
import ts from 'typescript-eslint';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import prettier from 'eslint-config-prettier';
|
|
import globals from 'globals';
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
...svelte.configs['flat/recommended'],
|
|
prettier,
|
|
...svelte.configs['flat/prettier'],
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.svelte'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: ts.parser
|
|
}
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ varsIgnorePattern: '^(\\$\\$(Props|Events|Slots)$|_)' }
|
|
],
|
|
'@typescript-eslint/no-empty-object-type': [
|
|
'error',
|
|
{ allowInterfaces: 'with-single-extends' }
|
|
]
|
|
}
|
|
},
|
|
{
|
|
ignores: ['build/', '.svelte-kit/', 'dist/']
|
|
}
|
|
];
|