diff options
author | rtkay123 <dev@kanjala.com> | 2025-06-22 11:25:31 +0200 |
---|---|---|
committer | rtkay123 <dev@kanjala.com> | 2025-06-22 11:25:31 +0200 |
commit | 333bcef4a58d16eb5a8940e9d08d32caa9db4480 (patch) | |
tree | 1e81da403c189af6d0e5b800d2ccfb105c209792 /eslint.config.js | |
download | kanjala.com-master.tar.bz2 kanjala.com-master.zip |
Diffstat (limited to 'eslint.config.js')
-rw-r--r-- | eslint.config.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..be96133 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,36 @@ +import prettier from 'eslint-config-prettier'; +import { includeIgnoreFile } from '@eslint/compat'; +import js from '@eslint/js'; +import svelte from 'eslint-plugin-svelte'; +import globals from 'globals'; +import { fileURLToPath } from 'node:url'; +import ts from 'typescript-eslint'; +import svelteConfig from './svelte.config.js'; + +const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); + +export default ts.config( + includeIgnoreFile(gitignorePath), + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs.recommended, + prettier, + ...svelte.configs.prettier, + { + languageOptions: { + globals: { ...globals.browser, ...globals.node } + }, + rules: { 'no-undef': 'off' } + }, + { + files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'], + languageOptions: { + parserOptions: { + projectService: true, + extraFileExtensions: ['.svelte'], + parser: ts.parser, + svelteConfig + } + } + } +); |