-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
147 lines (141 loc) · 3.61 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
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
"use strict";
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
globals: {
require: true,
process: true,
setImmediate: true,
Buffer: true,
},
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
parser: "@typescript-eslint/parser",
extends: [
"prettier",
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
],
plugins: [
"react",
"react-hooks",
"@typescript-eslint",
"jsx-a11y",
"eslint-plugin-import",
],
rules: {
// OFF
"class-methods-use-this": 0,
"import/prefer-default-export": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/heading-has-content": 0,
"jsx-a11y/label-has-associated-control": 0,
"linebreak-style": 0,
"no-underscore-dangle": 0,
"prefer-destructuring": 0,
"react/forbid-prop-types": 0,
"react/jsx-indent": 0,
"react/no-did-mount-set-state": 0,
"react/no-did-update-set-state": 0,
"react/require-default-props": 0,
"react/jsx-one-expression-per-line": 0,
"lines-between-class-members": 0,
"react/destructuring-assignment": 0,
"react/jsx-wrap-multilines": 0,
"react/sort-comp": 0,
"react/prop-types": 0,
"no-await-in-loop": 0,
camelcase: 0,
"no-continue": 0,
"guard-for-in": 0,
"global-require": 0,
"no-param-reassign": 0,
"func-names": 0,
"react/jsx-props-no-spreading": 0,
"react/state-in-constructor": 0,
"react/jsx-fragments": 0,
"react/static-property-placement": 0,
"max-classes-per-file": 0,
"react-hooks/exhaustive-deps": 0,
"react/jsx-uses-react": 0,
"react/react-in-jsx-scope": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-loss-of-precision": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"import/extensions": [
0,
"always",
{
ignorePackages: true,
extensions: {
js: "never",
ts: "never",
tsx: "never",
},
},
],
// WARN
"@typescript-eslint/no-unused-vars": [1, { ignoreRestSiblings: true }],
"no-console": [1, { allow: ["assert"] }],
"no-debugger": 1,
"react/no-unused-prop-types": 1,
"react/no-array-index-key": 1,
"react/default-props-match-prop-types": 1,
"react/prefer-stateless-function": 1,
"react/no-unused-state": 1,
"react/jsx-curly-brace-presence": 1,
"arrow-body-style": 1,
"valid-jsdoc": [1],
"prefer-const": 1,
"import/first": 1,
"object-shorthand": 1,
"react/no-access-state-in-setstate": 1,
"require-await": 1,
"import/order": [
1,
{
groups: [
"builtin",
"external",
"type",
"internal",
["parent", "sibling"],
],
},
],
// ERROR
// since the aim of app is comparison between different state managers
"react-hooks/rules-of-hooks": 0,
// "react-hooks/rules-of-hooks": 2,
"jsx-a11y/anchor-is-valid": [
2,
{
components: ["Link"],
specialLink: ["hrefLeft", "hrefRight", "to"],
aspects: ["noHref", "invalidHref", "preferButton"],
},
],
"no-unused-expressions": [2, { allowTaggedTemplates: true }],
"react/jsx-filename-extension": [2, { extensions: [".js", ".tsx"] }],
"no-restricted-syntax": [2, "WithStatement"],
},
settings: {
"import/resolver": {
node: {
paths: ["src"],
extensions: [".js", ".ts", ".tsx"],
},
},
},
};