-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
60 lines (60 loc) · 1.6 KB
/
.eslintrc.cjs
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
module.exports = {
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:jsx-a11y/recommended",
"eslint-config-prettier",
],
settings: {
react: {
// Tells eslint-plugin-react to automatically detect the version of React to use.
version: "detect",
},
// Tells eslint how to resolve imports
"import/resolver": {
typescript: {},
node: {
paths: ["src"],
extensions: [".js", ".jsx", ".ts", ".tsx"],
moduleDirectory: [
"node_modules",
"src/",
"src/assets",
"src/components",
],
},
alias: {
map: [
["@", "./src"],
["@assets", "./src/assets"],
["@components", "./src/components"],
["@pages", "./src/pages"],
["@store", "./src/store"],
],
},
},
},
parser: "@typescript-eslint/parser",
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": "warn",
"no-unused-vars": [
"error",
{
vars: "all",
args: "after-used",
ignoreRestSiblings: true,
argsIgnorePattern: "^_",
},
],
"react/react-in-jsx-scope": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"react-refresh/only-export-components": "off",
"@typescript-eslint/no-empty-function": "off",
},
};