diff options
| author | rtkay123 <dev@kanjala.com> | 2026-04-12 15:18:08 +0200 |
|---|---|---|
| committer | rtkay123 <dev@kanjala.com> | 2026-04-12 15:18:08 +0200 |
| commit | 98f5dbca1446abd70beca653ea11440bba6a1171 (patch) | |
| tree | a6963d36f9b118e3bedd6ae23236271402a04909 /webapp/eslint.config.js | |
| parent | 172b1062d43e8cee9eccfe8457ea08f017ed0ac7 (diff) | |
| download | sellershut-98f5dbca1446abd70beca653ea11440bba6a1171.tar.bz2 sellershut-98f5dbca1446abd70beca653ea11440bba6a1171.zip | |
Diffstat (limited to 'webapp/eslint.config.js')
| -rw-r--r-- | webapp/eslint.config.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/webapp/eslint.config.js b/webapp/eslint.config.js new file mode 100644 index 0000000..3825eaf --- /dev/null +++ b/webapp/eslint.config.js @@ -0,0 +1,44 @@ +import prettier from 'eslint-config-prettier'; +import path from 'node:path'; +import { includeIgnoreFile } from '@eslint/compat'; +import js from '@eslint/js'; +import svelte from 'eslint-plugin-svelte'; +import { defineConfig } from 'eslint/config'; +import globals from 'globals'; +import ts from 'typescript-eslint'; +import svelteConfig from './svelte.config.js'; + +const gitignorePath = path.resolve(import.meta.dirname, '.gitignore'); + +export default defineConfig( + includeIgnoreFile(gitignorePath), + js.configs.recommended, + ts.configs.recommended, + svelte.configs.recommended, + prettier, + svelte.configs.prettier, + { + languageOptions: { globals: { ...globals.browser, ...globals.node } }, + rules: { + // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. + // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors + 'no-undef': 'off', + }, + }, + { + files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'], + languageOptions: { + parserOptions: { + projectService: true, + extraFileExtensions: ['.svelte'], + parser: ts.parser, + svelteConfig, + }, + }, + }, + { + // Override or add rule settings here, such as: + // 'svelte/button-has-type': 'error' + rules: {}, + }, +); |
