-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
137 lines (137 loc) · 3.99 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint/eslint-plugin",
"prettier",
"simple-import-sort"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"root": true,
"env": {
"node": true,
"jest": true
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ "accessibility": "no-public" }
],
"@typescript-eslint/consistent-type-assertions": [
"error",
{ "assertionStyle": "as", "objectLiteralTypeAssertions": "never" }
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "args",
"destructuredArrayIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/naming-convention": [
"error",
{ "selector": "default", "format": ["strictCamelCase"] },
{ "selector": "typeLike", "format": ["PascalCase"] },
{
"selector": "variable",
"format": [
"strictCamelCase",
"UPPER_CASE",
"PascalCase" // decorator definition
]
},
{
"selector": "parameter",
"modifiers": ["unused"],
"format": ["strictCamelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "classProperty",
"format": [
"strictCamelCase",
"PascalCase" // component enum
]
},
{ "selector": "enumMember", "format": ["PascalCase"] }
],
"eqeqeq": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unreachable-loop": "error",
"arrow-body-style": "error",
"curly": ["error", "multi", "consistent"],
"default-case-last": "error",
"grouped-accessor-pairs": "error",
"no-alert": "error",
"no-bitwise": "error",
"no-console": "error",
"no-else-return": "error",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-eval": "error",
"no-extend-native": "error",
"no-extra-label": "error",
"no-implied-eval": "error",
"no-label-var": "error",
"no-negated-condition": "error",
"no-new-wrappers": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"prefer-promise-reject-errors": "error",
"@typescript-eslint/no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-void": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"operator-assignment": "error",
"prefer-arrow-callback": "error",
"prefer-exponentiation-operator": "error",
"prefer-numeric-literals": "error",
"prefer-object-spread": "error",
"prefer-regex-literals": "error",
"prefer-spread": "error",
"require-unicode-regexp": "error",
"max-params": ["warn", 3],
"max-depth": ["warn", 4],
"max-lines": ["warn", 300],
"max-lines-per-function": ["warn", 50],
"complexity": ["warn", 8],
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn"
},
"overrides": [
{
"files": ["**/*.{spec,test}.ts"],
"rules": {
"max-lines": "off",
"max-lines-per-function": "off"
}
},
{
"files": ["**/*.{service,component,directive,resolver}.ts"], // constructor based dependency injection
"rules": {
"max-params": "off"
}
}
]
}