@bratislava/eslint-config-react 0.3.2 → 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 +10 -5
- package/package.json +3 -2
package/index.js
CHANGED
|
@@ -22,6 +22,7 @@ import react from "eslint-plugin-react";
|
|
|
22
22
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
23
23
|
import security from "eslint-plugin-security";
|
|
24
24
|
import sonarjs from "eslint-plugin-sonarjs";
|
|
25
|
+
import tailwindcss from "eslint-plugin-tailwindcss";
|
|
25
26
|
import globals from "globals";
|
|
26
27
|
import tseslint from "typescript-eslint";
|
|
27
28
|
|
|
@@ -83,6 +84,7 @@ const frontendRules = {
|
|
|
83
84
|
{ checksVoidReturn: { attributes: false } },
|
|
84
85
|
],
|
|
85
86
|
"@typescript-eslint/no-floating-promises": "warn",
|
|
87
|
+
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
86
88
|
};
|
|
87
89
|
|
|
88
90
|
/**
|
|
@@ -103,23 +105,26 @@ const frontendRules = {
|
|
|
103
105
|
export function createReactConfig(options = {}) {
|
|
104
106
|
const { ignores = [] } = options;
|
|
105
107
|
|
|
106
|
-
return
|
|
108
|
+
return [
|
|
107
109
|
// Base configs
|
|
108
110
|
eslint.configs.recommended,
|
|
109
|
-
tseslint.configs.strictTypeChecked,
|
|
110
|
-
tseslint.configs.stylistic,
|
|
111
|
+
...tseslint.configs.strictTypeChecked,
|
|
112
|
+
...tseslint.configs.stylistic,
|
|
111
113
|
prettier,
|
|
112
114
|
simpleImportSortConfig,
|
|
113
115
|
security.configs.recommended,
|
|
114
116
|
noUnsanitized.configs.recommended,
|
|
115
117
|
sonarjs.configs.recommended,
|
|
116
118
|
tanstackQuery.configs["flat/recommended"],
|
|
119
|
+
...tailwindcss.configs["flat/recommended"],
|
|
120
|
+
|
|
121
|
+
// React hooks recommended config (includes plugin and rules)
|
|
122
|
+
reactHooks.configs.flat.recommended,
|
|
117
123
|
|
|
118
124
|
// React and related plugins
|
|
119
125
|
{
|
|
120
126
|
plugins: {
|
|
121
127
|
react,
|
|
122
|
-
"react-hooks": reactHooks,
|
|
123
128
|
import: importPlugin,
|
|
124
129
|
"jsx-a11y": jsxA11y,
|
|
125
130
|
},
|
|
@@ -185,7 +190,7 @@ export function createReactConfig(options = {}) {
|
|
|
185
190
|
...ignores,
|
|
186
191
|
],
|
|
187
192
|
},
|
|
188
|
-
|
|
193
|
+
];
|
|
189
194
|
}
|
|
190
195
|
|
|
191
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",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
41
41
|
"eslint-plugin-security": "3.0.1",
|
|
42
42
|
"eslint-plugin-sonarjs": "3.0.5",
|
|
43
|
+
"eslint-plugin-tailwindcss": "3.18.2",
|
|
43
44
|
"globals": "16.5.0",
|
|
44
45
|
"typescript-eslint": "8.52.0"
|
|
45
46
|
},
|