|
1 | 1 | // eslint.config.js |
2 | | -import js from '@eslint/js'; |
3 | | -import tseslint from 'typescript-eslint'; |
4 | | -import globals from 'globals'; |
| 2 | +import js from "@eslint/js"; |
| 3 | +import tseslint from "typescript-eslint"; |
| 4 | +import globals from "globals"; |
5 | 5 |
|
6 | 6 | export default [ |
7 | | - // Ignoriere Build-/Infra-Kram |
8 | | - { ignores: ['dist/**', 'coverage/**', 'node_modules/**', 'etc/**', '.github/**'] }, |
| 7 | + // Ignoriere Build-/Infra-Kram |
| 8 | + { |
| 9 | + ignores: [ |
| 10 | + "dist/**", |
| 11 | + "coverage/**", |
| 12 | + "node_modules/**", |
| 13 | + "etc/**", |
| 14 | + ".github/**", |
| 15 | + ], |
| 16 | + }, |
9 | 17 |
|
10 | | - // JS-Basisregeln |
11 | | - js.configs.recommended, |
| 18 | + // JS-Basisregeln |
| 19 | + js.configs.recommended, |
12 | 20 |
|
13 | | - // TypeScript-Empfehlungen (ohne Type-Checking -> schnell & robust in CI) |
14 | | - ...tseslint.configs.recommended, |
| 21 | + // TypeScript-Empfehlungen (ohne Type-Checking -> schnell & robust in CI) |
| 22 | + ...tseslint.configs.recommended, |
15 | 23 |
|
16 | | - // TS-spezifische Settings/Regeln |
17 | | - { |
18 | | - files: ['**/*.ts', '**/*.tsx'], |
19 | | - languageOptions: { |
20 | | - ecmaVersion: 'latest', |
21 | | - sourceType: 'module', |
22 | | - globals: { ...globals.node }, |
23 | | - }, |
24 | | - rules: { |
25 | | - // Dein Projektstil: |
26 | | - 'no-console': 'off', |
27 | | - }, |
| 24 | + // TS-spezifische Settings/Regeln |
| 25 | + { |
| 26 | + files: ["**/*.ts", "**/*.tsx"], |
| 27 | + languageOptions: { |
| 28 | + ecmaVersion: "latest", |
| 29 | + sourceType: "module", |
| 30 | + globals: { ...globals.node }, |
28 | 31 | }, |
| 32 | + rules: { |
| 33 | + // Dein Projektstil: |
| 34 | + "no-console": "off", |
| 35 | + }, |
| 36 | + }, |
29 | 37 |
|
30 | | - // Test-Dateien: Vitest-Globals erlauben |
31 | | - { |
32 | | - files: ['**/*.test.ts', 'test/**/*.ts'], |
33 | | - languageOptions: { |
34 | | - globals: { |
35 | | - ...globals.node, |
36 | | - describe: 'readonly', |
37 | | - it: 'readonly', |
38 | | - expect: 'readonly', |
39 | | - beforeAll: 'readonly', |
40 | | - afterAll: 'readonly', |
41 | | - afterEach: 'readonly', |
42 | | - }, |
43 | | - }, |
44 | | - rules: {}, |
| 38 | + // Test-Dateien: Vitest-Globals erlauben |
| 39 | + { |
| 40 | + files: ["**/*.test.ts", "test/**/*.ts"], |
| 41 | + languageOptions: { |
| 42 | + globals: { |
| 43 | + ...globals.node, |
| 44 | + describe: "readonly", |
| 45 | + it: "readonly", |
| 46 | + expect: "readonly", |
| 47 | + beforeAll: "readonly", |
| 48 | + afterAll: "readonly", |
| 49 | + afterEach: "readonly", |
| 50 | + }, |
45 | 51 | }, |
| 52 | + rules: {}, |
| 53 | + }, |
46 | 54 |
|
47 | | - // Kollisionen mit Prettier vermeiden |
48 | | - { |
49 | | - rules: { |
50 | | - ...{ }, // hier nichts nötig – config-prettier reicht |
51 | | - }, |
| 55 | + // Kollisionen mit Prettier vermeiden |
| 56 | + { |
| 57 | + rules: { |
| 58 | + ...{}, // hier nichts nötig – config-prettier reicht |
52 | 59 | }, |
| 60 | + }, |
53 | 61 | ]; |
0 commit comments