40 lines
980 B
JavaScript
40 lines
980 B
JavaScript
import globals from 'globals';
|
|
import js from '@eslint/js';
|
|
import ts from 'typescript-eslint';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
import svelteConfig from './svelte.config.js';
|
|
|
|
export default ts.config(
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
...svelte.configs.recommended,
|
|
eslintConfigPrettier,
|
|
{
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.es2017,
|
|
...globals.node
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
|
ignores: ['eslint.config.js', 'svelte.config.js'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
extraFileExtensions: ['.svelte'],
|
|
parser: ts.parser,
|
|
svelteConfig
|
|
}
|
|
}
|
|
},
|
|
{
|
|
ignores: ['.svelte-kit/*', 'build/*', 'dist/*'] // Add common ignore patterns
|
|
}
|
|
);
|