-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
47 lines (46 loc) · 1.28 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
module.exports = {
root: true,
extends: [
"@finga",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
],
plugins: [
"use-effect-no-deps",
],
rules: {
"eqeqeq": ["error", "smart"],
"use-effect-no-deps/use-effect-no-deps": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/keyword-spacing": "error",
// This is just a stupid rule. Many times you need to
// pass an async callback to an onClick, and this rule
// reports it as misuse, it is not misuse.
"@typescript-eslint/no-misused-promises": "off",
// For some reason these rules falsely report
// access to React Event fields e.g. the following is correct
// but the rules report it:
// <div onClick={(event: React.MouseEvent<HTMLButtonElement>) => event.altKey}}/>
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
},
overrides: [
{
files: [
"tests/**/*.ts",
"tests/**/*.tsx",
"tests/**/*.js",
"tests/**/*.jsx",
],
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
}
}
],
settings: {
react: {
version: "detect"
},
}
}