forked from kamilmysliwiec/nest-cqrs-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
107 lines (107 loc) · 3.98 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
103
104
105
106
107
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
plugins: [
"@typescript-eslint/eslint-plugin",
"import",
"node",
"unicorn",
"eslint-comments",
"sonarjs",
"rxjs",
"security",
"prefer-arrow",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:node/recommended",
"plugin:eslint-comments/recommended",
"plugin:unicorn/recommended",
"plugin:sonarjs/recommended",
"plugin:security/recommended",
"prettier",
],
root: true,
env: {
node: true,
es2017: true,
},
settings: {
node: {
tryExtensions: [".js", ".json", ".node", ".ts"],
},
},
rules: {
"no-console": "off",
"no-unused-vars": "off",
"no-dupe-class-members": "off",
"no-loss-of-precision": "off",
eqeqeq: "error",
"node/no-unsupported-features/es-syntax": [
"error",
{ ignores: ["modules"] },
],
"node/no-unpublished-import": "off",
"unicorn/prevent-abbreviations": [
"error",
{
checkFilenames: false,
},
],
"eslint-comments/disable-enable-pair": [
"error",
{ allowWholeFile: true },
],
"import/order": ["error", { "newlines-between": "always" }],
"security/detect-object-injection": "off",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/array-type": ["error", { default: "array" }],
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/ban-tslint-comment": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface",
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-floating-promises": [
"error",
{ ignoreVoid: false, ignoreIIFE: false },
],
"@typescript-eslint/no-implicit-any-catch": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/return-await": "error",
},
};