This repository has no description
1.4 kB
41 lines
1import { fileURLToPath } from 'node:url';
2import { includeIgnoreFile } from '@eslint/compat';
3import js from '@eslint/js';
4import prettier from 'eslint-config-prettier';
5import svelte from 'eslint-plugin-svelte';
6import { defineConfig } from 'eslint/config';
7import globals from 'globals';
8import ts from 'typescript-eslint';
9
10const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
11
12export default defineConfig(
13 includeIgnoreFile(gitignorePath),
14 // Auto-generated lexicon client code (regenerated by `pnpm lexgen`); also ignored in .prettierignore
15 { ignores: ['src/lib/lexicon/**'] },
16 js.configs.recommended,
17 ...ts.configs.recommended,
18 ...svelte.configs.recommended,
19 prettier,
20 ...svelte.configs.prettier,
21 {
22 languageOptions: {
23 globals: { ...globals.browser, ...globals.node }
24 },
25 rules: {
26 // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
27 // 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
28 'no-undef': 'off'
29 }
30 },
31 {
32 files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
33 languageOptions: {
34 parserOptions: {
35 projectService: true,
36 extraFileExtensions: ['.svelte'],
37 parser: ts.parser
38 }
39 }
40 }
41);