-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
140 lines (140 loc) · 4.09 KB
/
.eslintrc
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": ["plugin:@typescript-eslint/recommended", "eslint:recommended", "plugin:react/recommended"],
"plugins": ["react", "simple-import-sort"],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true
},
"project": "tsconfig.json"
},
"ignorePatterns": ["vite.config.ts"],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": "off",
"no-empty-pattern": "warn",
"@typescript-eslint/ban-types": "warn",
"react/prop-types": "off",
"react/display-name": "off",
"no-useless-escape": "off",
"semi": ["warn", "always"],
"quotes": ["error", "single"],
"jsx-quotes": ["error", "prefer-single"],
"object-curly-spacing": ["warn", "always"],
"keyword-spacing": [
"warn",
{
"before": true
}
],
"space-before-blocks": ["warn", "always"],
"space-infix-ops": "warn",
"no-prototype-builtins": "warn",
"react/react-in-jsx-scope": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/no-array-for-each": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"sonarjs/cognitive-complexity": "off",
"security/detect-unsafe-regex": "off",
"security/detect-non-literal-fs-filename": "off",
"simple-import-sort/exports": "error",
"unicorn/filename-case": "off",
"unicorn/no-null": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/prefer-module": "off",
"react-hooks/exhaustive-deps": "off",
"simple-import-sort/imports": [
"error",
{
"groups": [
[
"^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)"
],
["^react", "^@?\\w"],
["^(@|@company|@ui|components|utils|hooks|assets|config|api|types|vendored-lib|context)(/.*|$)"],
["^\\u0000"],
["^components"],
["^\\u0000"],
["^src(\\/.*|$)", "^features(\\/.*|$)", "^assets(\\/.*|$)", "^components(\\/.*|$)"],
["^\\u0000"],
["^\\.\\.(?!/?$)", "^\\.\\./?$", "^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
["^.+\\.s?css$"],
["^.+\\.(jpg|jpeg|png|svg)$"]
]
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "import",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "default",
"format": ["camelCase"]
},
{
"selector": "variable",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "variable",
"modifiers": ["const"],
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
},
{
"selector": "variable",
"types": ["boolean"],
"format": ["PascalCase"],
"prefix": ["is", "should", "has", "can", "did", "will", "match"]
},
{
"selector": "objectLiteralProperty",
"format": null
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"]
},
{
"selector": "default",
"modifiers": ["static"],
"format": ["UPPER_CASE"]
}
]
}
}