-
Notifications
You must be signed in to change notification settings - Fork 56
/
.eslintrc.json
128 lines (128 loc) · 3.73 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
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"react",
"@typescript-eslint",
"only-warn"
],
"settings": {
"react": {
"version": "detect"
}
},
"root": true,
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "off",
"@typescript-eslint/ban-types": ["warn", {
"types": {
"{}": false
},
"extendDefaults": true
}],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/indent": ["warn", 2, {
"MemberExpression": 0,
"SwitchCase": 1
}],
"@typescript-eslint/no-empty-function": ["warn", { "allow": ["arrowFunctions"] }],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-invalid-void-type": ["warn", { "allowInGenericTypeArguments": true }],
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-unused-vars": ["warn", {
"vars": "all",
"args": "none"
}],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/prefer-interface": "off",
//"react/no-access-state-in-setstate": "warn", (requires restructuring of "app.tsx")
"react/no-direct-mutation-state": "warn",
"react/no-render-return-value": "warn",
"react/no-string-refs": "warn",
"react/no-unescaped-entities": ["warn", {"forbid": [{
"char": ">",
"alternatives": [">"]
}, {
"char": "}",
"alternatives": ["}"]
}]}],
"react/no-unused-prop-types": "warn",
"react/no-unused-state": "warn",
"curly": ["warn", "all"],
"eol-last": "warn",
"for-direction": "warn",
"getter-return": "warn",
"keyword-spacing": "warn",
"no-compare-neg-zero": "warn",
"no-cond-assign": "warn",
"no-constant-condition": ["warn", { "checkLoops": false }],
"no-control-regex": "off",
"no-debugger": "warn",
"no-delete-var": "warn",
"no-dupe-args": "warn",
"no-dupe-keys": "warn",
"no-duplicate-case": "warn",
"no-empty": "warn",
"no-empty-character-class": "warn",
"no-empty-pattern": "warn",
"no-ex-assign": "warn",
"no-extra-boolean-cast": "warn",
"no-extra-semi": "warn",
"no-func-assign": "warn",
"no-global-assign": "warn",
"no-inner-declarations": "off",
"no-invalid-regexp": "warn",
"no-irregular-whitespace": "warn",
"no-mixed-spaces-and-tabs": "warn",
"no-obj-calls": "warn",
"no-octal": "warn",
"no-prototype-builtins": "warn",
"no-redeclare": "warn",
"no-regex-spaces": "warn",
"no-self-assign": "warn",
"no-shadow-restricted-names": "warn",
"no-spaced-func": "warn",
"no-sparse-arrays": "warn",
"no-trailing-spaces": "warn",
"no-unexpected-multiline": "warn",
"no-unreachable": "warn",
"no-unsafe-finally": "warn",
"no-unsafe-negation": "warn",
"no-unused-labels": "warn",
"no-useless-catch": "warn",
"no-useless-escape": "warn",
"no-whitespace-before-property": "warn",
"no-with": "warn",
"quotes": ["warn", "single"],
//"require-atomic-updates": "warn", (requires restructuring of "recursiveDirectory()")
"semi": ["warn", "always"],
"space-before-blocks": "warn",
"space-unary-ops": "warn",
"spaced-comment": "warn",
"use-isnan": "warn",
"valid-typeof": "warn",
"wrap-iife": "warn",
"yoda": "warn"
}
}