-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
162 lines (162 loc) · 4.75 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
{
"parser": "@typescript-eslint/parser",
"env": {
"es6": true,
"node": true
},
"extends": [
"airbnb-base",
"airbnb-typescript/base",
"plugin:import/typescript",
"prettier",
"plugin:jest/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["import", "prettier", "@typescript-eslint", "jest"],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"rules": {
"linebreak-style": ["error", "unix"],
"prettier/prettier": "error",
"semi": ["error", "never"],
"comma-dangle": ["error", "never"],
"arrow-parens": ["error", "as-needed"],
"consistent-return": "off",
"no-underscore-dangle": "off",
"arrow-body-style": "off",
"no-await-in-loop": "off",
"func-names": "off",
"class-methods-use-this": "off",
"no-useless-constructor": "off",
"no-unused-vars": "off",
"no-extra-parens": "off",
"no-case-declarations": "off",
"object-shorthand": "error",
"no-template-curly-in-string": "error",
"max-classes-per-file": "off",
"prefer-template": "error",
"no-shadow": "off",
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"lines-between-class-members": "off",
"no-param-reassign": "off",
"no-console": "off",
"no-nested-ternary": "off",
"no-use-before-define": "off",
"prefer-arrow-callback": ["error", { "allowUnboundThis": true, "allowNamedFunctions": true }],
"radix": "off",
"prefer-const": [
"error",
{
"destructuring": "all",
"ignoreReadBeforeAssign": false
}
],
"quotes": [
"error",
"single",
{
"allowTemplateLiterals": true,
"avoidEscape": false
}
],
"space-in-parens": ["error", "never"],
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
"keyword-spacing": ["error", { "before": true, "after": true }],
"space-before-blocks": ["error", "always"],
"no-trailing-spaces": "error",
"no-multi-spaces": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-extra-parens": ["off"],
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-implicity-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unsafe-call": "off",
"import/no-unresolved": "error",
"import/extensions": [
"error",
"never",
{
"json": "always"
}
],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"pathGroups": [
{
"pattern": "@common/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@modules/**",
"group": "internal",
"position": "before"
},
{
"pattern": "@nestjs/**",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["builtin"]
}
],
"import/no-extraneous-dependencies": "off",
"import/prefer-default-export": "off"
},
"overrides": [
{
"files": ["./test/*.e2e-spec.ts"],
"rules": {
"jest/expect-expect": "off"
}
}
]
}