|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + es6: true, |
| 5 | + es2022: true, |
| 6 | + node: true, |
| 7 | + }, |
| 8 | + parserOptions: { |
| 9 | + ecmaVersion: 2022, |
| 10 | + }, |
| 11 | + rules: { |
| 12 | + 'no-console': ['error', { allow: ['error', 'warn'] }], |
| 13 | + }, |
| 14 | + overrides: [ |
| 15 | + { |
| 16 | + files: ['api/**/*'], |
| 17 | + settings: { |
| 18 | + 'import/resolver': { |
| 19 | + node: true, |
| 20 | + }, |
| 21 | + }, |
| 22 | + }, |
| 23 | + { |
| 24 | + files: ['**/*.vue'], |
| 25 | + parser: 'vue-eslint-parser', |
| 26 | + parserOptions: { |
| 27 | + parser: '@typescript-eslint/parser', |
| 28 | + }, |
| 29 | + extends: [ |
| 30 | + 'eslint:recommended', |
| 31 | + 'plugin:@typescript-eslint/recommended', |
| 32 | + 'plugin:vue/vue3-recommended', |
| 33 | + 'plugin:prettier/recommended', |
| 34 | + ], |
| 35 | + rules: { |
| 36 | + 'vue/component-name-in-template-casing': 'warn', |
| 37 | + 'vue/match-component-file-name': [ |
| 38 | + 'warn', |
| 39 | + { |
| 40 | + extensions: ['vue'], |
| 41 | + }, |
| 42 | + ], |
| 43 | + 'vue/no-static-inline-styles': 'warn', |
| 44 | + 'vue/no-template-target-blank': 'warn', |
| 45 | + 'vue/no-potential-component-option-typo': 'warn', |
| 46 | + 'vue/multi-word-component-names': 'off', |
| 47 | + 'vue/require-default-prop': 'off', // Durch typescript ist das immer ersichtlich, dass es undefined sein kann. |
| 48 | + 'vue/no-ref-object-destructure': 'error', |
| 49 | + 'vue/no-undef-components': ['error', { ignorePatterns: ['ValidationProvider', 'router-link', 'router-view'] }], |
| 50 | + 'vue/no-unused-refs': 'error', |
| 51 | + 'vue/no-useless-mustaches': 'error', |
| 52 | + 'vue/no-useless-v-bind': 'error', |
| 53 | + 'vue/v-on-function-call': 'error', |
| 54 | + 'vue/no-unused-properties': ['error', { groups: ['props', 'data', 'computed', 'methods', 'setup'] }], |
| 55 | + 'vue/html-button-has-type': 'error', |
| 56 | + }, |
| 57 | + }, |
| 58 | + { |
| 59 | + files: ['**/*.ts'], |
| 60 | + plugins: ['@typescript-eslint'], |
| 61 | + parser: '@typescript-eslint/parser', |
| 62 | + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], |
| 63 | + settings: { |
| 64 | + 'import/parsers': { |
| 65 | + '@typescript-eslint/parser': ['.ts', '.tsx'], |
| 66 | + }, |
| 67 | + 'import/resolver': { |
| 68 | + typescript: true, |
| 69 | + }, |
| 70 | + }, |
| 71 | + rules: { |
| 72 | + '@typescript-eslint/no-explicit-any': 'off', |
| 73 | + '@typescript-eslint/no-empty-interface': 'off', |
| 74 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 75 | + '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', |
| 76 | + '@typescript-eslint/no-unused-vars': [ |
| 77 | + 'error', |
| 78 | + { argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }, |
| 79 | + ], |
| 80 | + }, |
| 81 | + }, |
| 82 | + { |
| 83 | + files: ['**/*.js'], |
| 84 | + extends: ['eslint:recommended', 'plugin:prettier/recommended'], |
| 85 | + rules: { |
| 86 | + 'no-unused-vars': 'off', |
| 87 | + }, |
| 88 | + }, |
| 89 | + { |
| 90 | + files: ['frontend/**/*'], |
| 91 | + env: { |
| 92 | + browser: true, |
| 93 | + }, |
| 94 | + }, |
| 95 | + { |
| 96 | + files: ['frontend/**/*'], |
| 97 | + parserOptions: { |
| 98 | + sourceType: 'module', |
| 99 | + }, |
| 100 | + }, |
| 101 | + { |
| 102 | + files: ['api/test/**/*.js'], |
| 103 | + env: { |
| 104 | + mocha: true, |
| 105 | + }, |
| 106 | + }, |
| 107 | + ], |
| 108 | +} |
0 commit comments