@dr.pogodin/eslint-configs 0.0.11 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/javascript.js +4 -1
- package/config/react.js +15 -0
- package/package.json +9 -9
package/config/javascript.js
CHANGED
|
@@ -126,8 +126,11 @@ export default defineConfig([{
|
|
|
126
126
|
'@stylistic/multiline-ternary': 'off',
|
|
127
127
|
'@stylistic/no-confusing-arrow': 'error',
|
|
128
128
|
'@stylistic/no-extra-parens': ['error', 'all', {
|
|
129
|
-
enforceForArrowConditionals: false,
|
|
130
129
|
ignoreJSX: 'multi-line',
|
|
130
|
+
ignoredNodes: [
|
|
131
|
+
// NOTE: Replaces the deprecated "enforceForArrowConditionals": option.
|
|
132
|
+
'ArrowFunctionExpression[body.type=ConditionalExpression]',
|
|
133
|
+
],
|
|
131
134
|
nestedBinaryExpressions: false,
|
|
132
135
|
returnAssign: false,
|
|
133
136
|
}],
|
package/config/react.js
CHANGED
|
@@ -125,7 +125,22 @@ export default defineConfig([{
|
|
|
125
125
|
// Rules provided by eslint-plugin-react-hooks; they should be applied to
|
|
126
126
|
// all files, as hooks do not have to live exclusively in .jsx / .tsx files
|
|
127
127
|
// alongside JSX syntax!
|
|
128
|
+
'react-hooks/component-hook-factories': 'error',
|
|
129
|
+
'react-hooks/config': 'error',
|
|
130
|
+
'react-hooks/error-boundaries': 'error',
|
|
128
131
|
'react-hooks/exhaustive-deps': 'error',
|
|
132
|
+
'react-hooks/gating': 'error',
|
|
133
|
+
'react-hooks/globals': 'error',
|
|
134
|
+
'react-hooks/immutability': 'error',
|
|
135
|
+
'react-hooks/incompatible-library': 'error',
|
|
136
|
+
'react-hooks/preserve-manual-memoization': 'error',
|
|
137
|
+
'react-hooks/purity': 'error',
|
|
138
|
+
'react-hooks/refs': 'error',
|
|
129
139
|
'react-hooks/rules-of-hooks': 'error',
|
|
140
|
+
'react-hooks/set-state-in-effect': 'error',
|
|
141
|
+
'react-hooks/set-state-in-render': 'error',
|
|
142
|
+
'react-hooks/static-components': 'error',
|
|
143
|
+
'react-hooks/unsupported-syntax': 'error',
|
|
144
|
+
'react-hooks/use-memo': 'error',
|
|
130
145
|
},
|
|
131
146
|
}]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dr.pogodin/eslint-configs",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "ESLint configurations for TypeScript and/or React projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./config/index.js",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://dr.pogodin.studio/docs/eslint-configs",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@babel/eslint-parser": "^7.28.
|
|
32
|
+
"@babel/eslint-parser": "^7.28.4",
|
|
33
33
|
"@babel/eslint-plugin": "^7.27.1",
|
|
34
|
-
"@babel/preset-env": "^7.28.
|
|
34
|
+
"@babel/preset-env": "^7.28.3",
|
|
35
35
|
"@babel/preset-react": "^7.27.1",
|
|
36
36
|
"@babel/preset-typescript": "^7.27.1",
|
|
37
|
-
"@eslint/js": "^9.
|
|
38
|
-
"@stylistic/eslint-plugin": "^5.
|
|
39
|
-
"eslint": "^9.
|
|
37
|
+
"@eslint/js": "^9.37.0",
|
|
38
|
+
"@stylistic/eslint-plugin": "^5.4.0",
|
|
39
|
+
"eslint": "^9.37.0",
|
|
40
40
|
"eslint-plugin-import": "^2.32.0",
|
|
41
41
|
"eslint-plugin-jest": "^29.0.1",
|
|
42
42
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
43
43
|
"eslint-plugin-react": "^7.37.4",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"typescript-eslint": "^8.
|
|
44
|
+
"typescript": "^5.9.3",
|
|
45
|
+
"eslint-plugin-react-hooks": "^6.1.1",
|
|
46
|
+
"typescript-eslint": "^8.45.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"eslint-import-resolver-typescript": "^4.4.4"
|