|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + node: true, |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + "plugin:vue/vue3-essential", |
| 8 | + "eslint:recommended", |
| 9 | + "@vue/typescript/recommended", |
| 10 | + "plugin:prettier/recommended", |
| 11 | + ], |
| 12 | + parserOptions: { |
| 13 | + ecmaVersion: 2020, |
| 14 | + }, |
| 15 | + rules: { |
| 16 | + "@typescript-eslint/no-explicit-any": "warn", |
| 17 | + "no-console": process.env.NODE_ENV === "production" ? "off" : "warn", |
| 18 | + "no-debugger": process.env.NODE_ENV === "production" ? "off" : "warn", |
| 19 | + "no-useless-escape": "error", |
| 20 | + "no-irregular-whitespace": "error", |
| 21 | + "no-undef": "warn", |
| 22 | + "no-prototype-builtins": "error", |
| 23 | + "no-empty": "error", |
| 24 | + "no-var": "error", |
| 25 | + "prefer-const": "error", |
| 26 | + "prettier/prettier": "error", |
| 27 | + "@typescript-eslint/no-empty-function": "error", |
| 28 | + "@typescript-eslint/ban-ts-comment": "error", |
| 29 | + "@typescript-eslint/no-inferrable-types": "error", |
| 30 | + "@typescript-eslint/ban-types": "error", |
| 31 | + "vue/no-v-text-v-html-on-component": "error", |
| 32 | + "vue/no-v-html": "error", |
| 33 | + "vue/html-self-closing": [ |
| 34 | + "error", |
| 35 | + { |
| 36 | + html: { |
| 37 | + void: "always", |
| 38 | + }, |
| 39 | + }, |
| 40 | + ], |
| 41 | + "vue/no-setup-props-reactivity-loss": "error", |
| 42 | + "vue/no-useless-template-attributes": "error", |
| 43 | + "vue/no-mutating-props": "error", |
| 44 | + // TODO - make a final decision about this rule |
| 45 | + "vue/multi-word-component-names": "off", |
| 46 | + "@typescript-eslint/no-restricted-imports": [ |
| 47 | + "warn", |
| 48 | + { |
| 49 | + patterns: [ |
| 50 | + { |
| 51 | + group: [ |
| 52 | + "@data/*/**/*", |
| 53 | + "@feature/*/**/*", |
| 54 | + "@page/*/**/*", |
| 55 | + "@ui/*/**/*", |
| 56 | + "@util/*/**/*", |
| 57 | + ], |
| 58 | + message: "Do not deep import into a module", |
| 59 | + }, |
| 60 | + { |
| 61 | + group: ["@/modules/data/*", "*/../data/*", "../**/data/*"], |
| 62 | + message: |
| 63 | + "Data-Modules have to be imported using the pattern '@data/<name>'", |
| 64 | + }, |
| 65 | + { |
| 66 | + group: ["@/modules/feature/*", "*/../feature/*", "../**/feature/*"], |
| 67 | + message: |
| 68 | + "Feature-Modules have to be imported using the pattern '@feature/<name>'", |
| 69 | + }, |
| 70 | + { |
| 71 | + group: ["@/modules/page/*", "*/../page/*", "../**/page/*/*"], |
| 72 | + message: |
| 73 | + "Page-Modules have to be imported using the pattern '@page/<name>'", |
| 74 | + }, |
| 75 | + { |
| 76 | + group: ["@/modules/ui/*", "*/../ui/*", "../**/ui/*/*"], |
| 77 | + message: |
| 78 | + "Ui-Modules have to be imported using the pattern '@ui/<name>'", |
| 79 | + }, |
| 80 | + { |
| 81 | + group: ["@/modules/util/*", "*/../util/*", "../**/util/*/*"], |
| 82 | + message: |
| 83 | + "Util-Modules have to be imported using the pattern '@util/<name>'", |
| 84 | + }, |
| 85 | + ], |
| 86 | + }, |
| 87 | + ], |
| 88 | + }, |
| 89 | + overrides: [ |
| 90 | + { |
| 91 | + files: ["**/*.unit.{j,t}s?(x)"], |
| 92 | + env: { |
| 93 | + jest: true, |
| 94 | + }, |
| 95 | + globals: { |
| 96 | + mount: false, |
| 97 | + shallowMount: false, |
| 98 | + fail: false, |
| 99 | + }, |
| 100 | + }, |
| 101 | + ], |
| 102 | +}; |
0 commit comments