aboutsummaryrefslogtreecommitdiffstats
path: root/eslint.config.js
diff options
context:
space:
mode:
authorrtkay123 <dev@kanjala.com>2025-06-22 11:25:31 +0200
committerrtkay123 <dev@kanjala.com>2025-06-22 11:25:31 +0200
commit333bcef4a58d16eb5a8940e9d08d32caa9db4480 (patch)
tree1e81da403c189af6d0e5b800d2ccfb105c209792 /eslint.config.js
downloadkanjala.com-master.tar.bz2
kanjala.com-master.zip
initial commitHEADmaster
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js36
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
+ }
+ }
+ }
+);