-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.json
130 lines (130 loc) · 4.45 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
{
"extends": [
"eslint:recommended",
"prettier",
"plugin:eslint-comments/recommended",
"plugin:promise/recommended",
"plugin:jest/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["prettier", "promise", "jest"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"requireConfigFile": false
},
"env": {
"es2020": true,
"es6": true,
"node": true,
"jest": true,
"browser": true
},
"rules": {
"eslint-comments/no-unused-disable": "error",
"jest/consistent-test-it": "error",
"jest/expect-expect": "error",
"jest/prefer-spy-on": "error",
"jest/prefer-to-contain": "error",
"jest/prefer-to-have-length": "error",
"array-callback-return": "error",
"camelcase": "error",
"default-case": "error",
"dot-notation": "error",
"eqeqeq": ["error", "always", { "null": "ignore" }],
"global-require": "error",
"handle-callback-err": "error",
"no-array-constructor": "error",
"no-buffer-constructor": "error",
"no-duplicate-imports": "error",
"no-else-return": "error",
"no-empty-function": "error",
"no-eval": "error",
"no-extra-bind": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implied-eval": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-multi-assign": "error",
"no-multi-str": "error",
"no-nested-ternary": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-require": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-param-reassign": ["error", { "props": true }],
"no-path-concat": "error",
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-proto": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow-restricted-names": "error",
"no-shadow": "error",
"no-undef": ["error", { "typeof": true }],
"no-undef-init": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-catch": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"no-void": "error",
"no-with": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"prettier/prettier": "error",
"require-await": "error",
"strict": 0,
"yoda": ["error", "never"],
"import/no-deprecated": "error", // Prevents the use of deprecated imports
"import/no-dynamic-require": "error", // Prevents the use of dynamic expressions in CJS require
"import/no-absolute-path": "error", // Requires that all imports be specified in relative terms
"import/no-self-import": "error", // Prevents a module importing itself
"import/no-useless-path-segments": "error", // Prevents redundant path sections in imports
"import/no-unused-modules": "error", // Requires that all imports be used within the file somewhere.
"import/first": "error", // Requires that all imports appear at the top of the file
"import/no-duplicates": "error", // Prevents the same module being imported twice
"import/newline-after-import": "error", // Enforces seperation between imports and module definition
"import/extensions": "error", // Prevents the use of extensions when importing files
"import/no-unresolved": ["error"],
"import/named": "off",
"import/order": ["error", { "newlines-between": "always" }]
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint/eslint-plugin"],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"]
}
}
],
"settings": {
"import/resolver": {
"typescript": {} // this loads <rootdir>/tsconfig.json to eslint
}
}
}