-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.json
163 lines (163 loc) · 5.77 KB
/
.eslintrc.json
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
{
"root": true,
"plugins": ["@nx","prettier", "simple-import-sort", "@angular-eslint", "@typescript-eslint", "import"],
"parserOptions": {
"project": "tsconfig.*.json"
},
"settings": {
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"ignorePatterns": ["node_modules/**", "test.ts", "main.ts", "**.vue"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx", "*.vue"],
"rules": {
"vue/multi-word-component-names": "off"
}
},
{
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.base.json"],
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended",
"prettier"
],
"rules": {
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": true,
"checksConditionals": true
}
],
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/no-floating-promises": [
"error",
{
"ignoreVoid": true,
"ignoreIIFE": true
}
],
"no-empty-function": "error",
"@typescript-eslint/no-empty-function": [
"error",
{
"allow": ["constructors"]
}
],
"@typescript-eslint/no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"allowTernary": true
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/no-this-alias": [
"error",
{
"allowedNames": ["self"]
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@angular-eslint/no-empty-lifecycle-method": "off",
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": ["openforge"],
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": ["openforge"],
"style": "kebab-case"
}
],
"yoda": [2, "never"],
"simple-import-sort/imports": "error",
"no-compare-neg-zero": "error",
"eqeqeq": "error",
"no-magic-numbers": [
"error",
{
"ignore": [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 40, 90, 100, 200, 201, 204, 400, 404, 500, 2000, 10000, 15000, 20000],
"ignoreArrayIndexes": true
}
],
"arrow-body-style": ["error", "as-needed"],
"prefer-arrow-callback": "error",
"no-undef-init": "error",
"max-classes-per-file": ["error", 1],
"prettier/prettier": "error",
"brace-style": ["error", "1tbs"],
"max-len": [
"off",
{
"code": 140
}
],
"no-underscore-dangle": "error",
"import/no-cycle": [
"error",
{
"maxDepth": 10,
"ignoreExternal": true
}
],
"import/no-self-import": "error",
"import/named": 2,
"import/namespace": 2,
"import/default": 2,
"import/export": 2
}
},
{
"files": ["*.js"],
"parserOptions": {
"sourceType": "module"
},
"parser": "babel-eslint"
}
]
}