-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
49 lines (49 loc) · 1.49 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
module.exports = {
root: true,
env: {
browser: true,
es2020: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:@react-three/recommended",
"plugin:tailwindcss/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.json", "./tsconfig.node.json"],
},
settings: {
react: {
version: "detect",
},
},
plugins: ["@stylistic"],
rules: {
"react/react-in-jsx-scope": 0,
"react/no-unknown-property": ["off", { ignore: ["JSX"] }], // remove this rule when the bug in eslint is fixed
"@stylistic/spaced-comment": "error",
"@typescript-eslint/no-namespace": ["error", { allowDeclarations: true }],
"@typescript-eslint/no-unused-vars": [
"error",
{ ignoreRestSiblings: true },
],
},
/* override rule for shadcn component eslint errors */
overrides: [
{
files: ["**/components/ui/*.tsx", "**/components/hooks/*.tsx"],
rules: {
"react/prop-types": 0, // This rule doesn't make sense with TypeScript because we are already checking types.
"react-refresh/only-export-components": "off",
"tailwindcss/enforces-shorthand": "off",
"@typescript-eslint/no-unused-vars": "off",
"tailwindcss/no-custom-classname": "off",
},
},
],
}