-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
87 lines (87 loc) · 2.58 KB
/
.eslintrc.json
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
{
"root": true,
"settings": { "react": { "version": "detect" } },
"env": {
"node": true,
"browser": true,
"es2021": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": ["tsconfig.json"],
"ecmaVersion": 2021,
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"airbnb-typescript",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:eslint-comments/recommended",
"plugin:react-hooks/recommended"
],
"plugins": ["import", "prettier", "@typescript-eslint", "react-refresh"],
"ignorePatterns": ["vite.config.ts", "date.d.ts", "dist", "tailwind.config.js"],
"rules": {
"prettier/prettier": ["off", { "quoteProps": "as-needed" }],
"eslint-comments/no-use": ["error", { "allow": [] }],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never",
"d.ts": "never",
"": "never"
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/*.stories.*", "**/.storybook/**/*.*", "**/.babel/**/*.*"],
"peerDependencies": true
}
],
"react/destructuring-assignment": ["error", "always"],
"react/display-name": "off",
"react/no-unused-prop-types": "error",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/self-closing-comp": "error",
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
"react/jsx-no-useless-fragment": "error",
"react/jsx-sort-props": "error",
"react/jsx-tag-spacing": "error",
"react/jsx-pascal-case": "error",
"react/jsx-props-no-multi-spaces": "error",
"@typescript-eslint/comma-spacing": "error",
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"{}": false
}
}
],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/semi": "off",
"@typescript-eslint/indent": ["off"],
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/default-param-last": "off",
"no-console": "error",
"no-bitwise": "off",
"no-fallthrough": "off",
"react-hooks/rules-of-hooks": "off",
"react-refresh/only-export-components": ["warn", { "allowConstantExport": true }]
}
}