@bratislava/eslint-config-react 0.4.0 → 0.5.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/index.js +8 -5
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -84,6 +84,7 @@ const frontendRules = {
|
|
|
84
84
|
{ checksVoidReturn: { attributes: false } },
|
|
85
85
|
],
|
|
86
86
|
"@typescript-eslint/no-floating-promises": "warn",
|
|
87
|
+
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
/**
|
|
@@ -104,11 +105,11 @@ const frontendRules = {
|
|
|
104
105
|
export function createReactConfig(options = {}) {
|
|
105
106
|
const { ignores = [] } = options;
|
|
106
107
|
|
|
107
|
-
return
|
|
108
|
+
return [
|
|
108
109
|
// Base configs
|
|
109
110
|
eslint.configs.recommended,
|
|
110
|
-
tseslint.configs.strictTypeChecked,
|
|
111
|
-
tseslint.configs.stylistic,
|
|
111
|
+
...tseslint.configs.strictTypeChecked,
|
|
112
|
+
...tseslint.configs.stylistic,
|
|
112
113
|
prettier,
|
|
113
114
|
simpleImportSortConfig,
|
|
114
115
|
security.configs.recommended,
|
|
@@ -117,11 +118,13 @@ export function createReactConfig(options = {}) {
|
|
|
117
118
|
tanstackQuery.configs["flat/recommended"],
|
|
118
119
|
...tailwindcss.configs["flat/recommended"],
|
|
119
120
|
|
|
121
|
+
// React hooks recommended config (includes plugin and rules)
|
|
122
|
+
reactHooks.configs.flat.recommended,
|
|
123
|
+
|
|
120
124
|
// React and related plugins
|
|
121
125
|
{
|
|
122
126
|
plugins: {
|
|
123
127
|
react,
|
|
124
|
-
"react-hooks": reactHooks,
|
|
125
128
|
import: importPlugin,
|
|
126
129
|
"jsx-a11y": jsxA11y,
|
|
127
130
|
},
|
|
@@ -187,7 +190,7 @@ export function createReactConfig(options = {}) {
|
|
|
187
190
|
...ignores,
|
|
188
191
|
],
|
|
189
192
|
},
|
|
190
|
-
|
|
193
|
+
];
|
|
191
194
|
}
|
|
192
195
|
|
|
193
196
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bratislava/eslint-config-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "ESLint configuration for React projects (without Next.js)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"typescript": ">= 5"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@bratislava/eslint-config": "0.
|
|
32
|
+
"@bratislava/eslint-config": "0.5.0",
|
|
33
33
|
"@eslint/js": "9.34.0",
|
|
34
34
|
"@tanstack/eslint-plugin-query": "5.91.2",
|
|
35
35
|
"eslint-config-prettier": "10.1.8",
|