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