-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
94 lines (93 loc) · 2.5 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
{
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"plugins": ["@typescript-eslint", "prettier", "jest"],
"extends": [
"eslint:recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
"sourceType": "module", // Allows for the use of imports
"ecmaFeatures": {
"jsx": true // Allows for the parsing of JSX
}
//"project": ["./tsconfig.eslint.json"]
},
"env": {
"browser": true,
"node": true,
"jest": true,
"es6": true
},
"rules": {
"@typescript-eslint/ban-ts-comment": "error",
"prettier/prettier": "warn",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/array-type": ["error", { "default": "array" }],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Array": null
}
}
],
"no-return-await": "warn",
"no-trailing-spaces": [
"error",
{
"ignoreComments": true
}
],
"no-fallthrough": "error",
"jest/valid-expect": ["error", { "maxArgs": 2 }],
"jest/require-top-level-describe": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
], // Allow unused vars when prefixed with underscore
"jest/no-commented-out-tests": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"no-console": "warn",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/explicit-function-return-type": [
"warn",
{
"allowExpressions": true
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"curly": ["warn", "all"],
"eqeqeq": ["error", "allow-null"]
},
"overrides": [
{
// Unit tests
"files": ["*.{spec,test}.{ts,tsx}", "**/tests/**"],
"rules": {
"no-console": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
},
{
// Libraries
"files": ["libs/**"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "error"
}
},
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
}
],
"settings": {},
"globals": {
"NodeJS": true
}
}