-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
40 lines (40 loc) · 956 Bytes
/
Copy path.eslintrc.cjs
File metadata and controls
40 lines (40 loc) · 956 Bytes
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
module.exports = {
root: true,
env: {
browser: true,
es2020: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
plugins: ["react-refresh", "react"],
settings: {
react: {
version: "detect",
},
},
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
"no-unused-vars": "warn",
"no-undef": "warn",
"react/prop-types": "off", // Disable prop-types for TypeScript
"react/react-in-jsx-scope": "off", // Not needed with new JSX transform
"react-hooks/exhaustive-deps": "warn", // Allow warnings for exhaustive deps
},
};