-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
95 lines (95 loc) · 2.37 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
module.exports = {
env: {
browser: true,
es2021: true,
amd: true,
node: true,
},
extends: [
"plugin:react/recommended",
"standard-with-typescript",
"prettier",
"eslint:recommended",
"next",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
project: "tsconfig.eslint.json",
},
settings: {
react: {
version: "detect",
},
},
plugins: [
"react",
"simple-import-sort",
"prettier",
"@typescript-eslint",
"import",
"react-hooks",
"functional",
],
rules: {
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/strict-boolean-expressions": "off",
"jsx-a11y/no-static-element-interactions": [
"off",
{
handlers: [
"onClick",
"onMouseDown",
"onMouseUp",
"onKeyPress",
"onKeyDown",
"onKeyUp",
],
allowExpressionValues: false,
},
],
"jsx-a11y/click-events-have-key-events": "off",
"prettier/prettier": [
"error",
{},
{
usePrettierrc: true,
},
],
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"jsx-a11y/anchor-is-valid": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/no-unescaped-entities": "off",
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-namespace": "off",
"import/no-anonymous-default-export": "off",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-misused-promises": "off",
},
overrides: [
{
rules: {
"no-undef": "off",
},
files: ["**/*.ts", "**/*.tsx"],
},
],
};