forked from Linkta-org/core
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.json
More file actions
98 lines (94 loc) · 2.59 KB
/
.eslintrc.json
File metadata and controls
98 lines (94 loc) · 2.59 KB
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
88
89
90
91
92
93
94
95
96
97
98
{
"root": true,
"env": {
"browser": true,
"es2024": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"react",
"prettier",
"jsx-a11y",
"react-hooks",
"no-relative-import-paths"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended"
],
"ignorePatterns": ["node_modules/", "dist", "package*.json", "*.config.js", "*.html"],
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-var-requires": "off"
}
}
],
"rules": {
// General JavaScript/TypeScript rules
"no-console": "warn",
"no-unused-vars": "off", // replaced by @typescript-eslint/no-unused-vars
"prefer-rest-params": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/prefer-as-const": "error",
"no-shadow": "off", // replaced by @typescript-eslint/no-shadow
"@typescript-eslint/no-shadow": "error",
"quotes": [
"error",
"single",
{ "avoidEscape": true, "allowTemplateLiterals": true }
],
"arrow-body-style": "off",
"prefer-arrow-callback": "off",
"no-nested-ternary": "off",
"no-plusplus": "off",
"no-prototype-builtins": "off",
// Prettier integration
"prettier/prettier": "warn",
// Import/export rules
"import/no-default-export": "off",
"import/no-extraneous-dependencies": "off",
"no-relative-import-paths/no-relative-import-paths": [
"warn",
{
"allowSameFolder": true,
"prefix": "@"
}
],
// React-specific rules
"react/destructuring-assignment": "off",
"react/function-component-definition": "off",
"react/jsx-boolean-value": "off",
"react/jsx-filename-extension": "off",
"react/no-unused-prop-types": "warn",
"react/prop-types": "off",
// React hooks rules
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
"settings": {
"react": {
"version": "detect"
}
}
}