-
Notifications
You must be signed in to change notification settings - Fork 10
/
.eslintrc.js
46 lines (46 loc) · 1.08 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
module.exports = {
env: {
browser: true,
es2021: true,
"jest/globals": true,
},
extends: [
"prettier",
"plugin:react/recommended",
"standard",
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
},
plugins: [
"prettier",
"react-hooks",
"react",
"@typescript-eslint",
"testing-library",
"jest",
],
rules: {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": ["error", { forbid: [">", "}"] }],
"react/jsx-no-target-blank": "off",
},
overrides: [
// Only uses Testing Library lint rules in test files
{
files: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
extends: ["plugin:testing-library/react"],
},
],
}