-
Notifications
You must be signed in to change notification settings - Fork 588
/
.eslintrc.cjs
43 lines (43 loc) · 1.26 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
],
ignorePatterns: ["index.html", "node_modules/", "dist/", "backend/**/target"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react-compiler", "react-hooks"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"react/jsx-no-undef": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-namespace": "off",
"react-compiler/react-compiler": "warn", // blocked by https://github.com/facebook/react/issues/30782
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/no-children-prop": "off",
},
settings: {
react: {
version: "detect",
},
"import/resolver": {
alias: {
map: [
["@", "./src"],
["~", "./"],
],
extensions: [".tsx", ".ts", ".jsx", ".js", ".mjs", ".cjs"],
},
},
},
};