@qlik/eslint-config 1.4.1 → 1.4.3
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/package.json +11 -12
- package/src/configs/react.js +3 -15
- package/src/configs/rules/react-hooks.js +2 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qlik/eslint-config",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Qlik's ESLint configs",
|
|
5
5
|
"repository": "git@github.com:qlik-oss/dev-tools-js.git",
|
|
6
6
|
"license": "ISC",
|
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
"!**/__tests__"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@eslint
|
|
19
|
-
"@eslint/
|
|
20
|
-
"@typescript-eslint/
|
|
21
|
-
"@
|
|
22
|
-
"@vitest/eslint-plugin": "^1.3.15",
|
|
18
|
+
"@eslint/js": "^9.38.0",
|
|
19
|
+
"@typescript-eslint/parser": "^8.46.1",
|
|
20
|
+
"@typescript-eslint/utils": "^8.46.1",
|
|
21
|
+
"@vitest/eslint-plugin": "^1.3.23",
|
|
23
22
|
"confusing-browser-globals": "^1.0.11",
|
|
24
23
|
"eslint-config-prettier": "^10.1.8",
|
|
25
24
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
@@ -28,19 +27,19 @@
|
|
|
28
27
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
29
28
|
"eslint-plugin-playwright": "^2.2.2",
|
|
30
29
|
"eslint-plugin-react": "^7.37.5",
|
|
31
|
-
"eslint-plugin-react-hooks": "^
|
|
30
|
+
"eslint-plugin-react-hooks": "^7.0.0",
|
|
32
31
|
"eslint-plugin-svelte": "^3.12.4",
|
|
33
|
-
"eslint-plugin-testing-library": "^7.
|
|
32
|
+
"eslint-plugin-testing-library": "^7.13.3",
|
|
34
33
|
"globals": "^16.4.0",
|
|
35
34
|
"svelte-eslint-parser": "^1.3.3",
|
|
36
|
-
"typescript-eslint": "^8.
|
|
35
|
+
"typescript-eslint": "^8.46.1"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
38
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
40
39
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
41
|
-
"@types/eslint-plugin-jsx-a11y": "^6.10.
|
|
42
|
-
"@types/node": "^24.
|
|
43
|
-
"eslint": "^9.
|
|
40
|
+
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
41
|
+
"@types/node": "^24.8.1",
|
|
42
|
+
"eslint": "^9.38.0",
|
|
44
43
|
"prettier": "^3.6.2",
|
|
45
44
|
"typescript": "^5.9.3",
|
|
46
45
|
"vitest": "^3.2.4",
|
package/src/configs/react.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
import react from "@eslint-react/eslint-plugin";
|
|
3
2
|
import prettier from "eslint-config-prettier";
|
|
4
3
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
5
4
|
import eslintPluginReact from "eslint-plugin-react";
|
|
@@ -11,26 +10,15 @@ import reactRules from "./rules/react.js";
|
|
|
11
10
|
import { baseConfigJS, baseConfigTS } from "./shared/base.js";
|
|
12
11
|
import { baseCjsJS, baseCjsTS } from "./shared/node.js";
|
|
13
12
|
|
|
14
|
-
/** @type {any} */
|
|
15
|
-
const reactPlugin = eslintPluginReact;
|
|
16
|
-
|
|
17
13
|
/**
|
|
18
14
|
* @type {import("../types/index.js").ESLintFlatConfig}
|
|
19
15
|
*/
|
|
20
16
|
const reactBaseConfig = mergeConfigs(
|
|
21
17
|
// base it on the recommended react plugins config
|
|
22
|
-
|
|
23
|
-
reactPlugin.configs.flat.recommended,
|
|
18
|
+
eslintPluginReact.configs.flat.recommended,
|
|
24
19
|
jsxA11y.flatConfigs.recommended,
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
plugins: {
|
|
28
|
-
"react-hooks": reactHooks,
|
|
29
|
-
},
|
|
30
|
-
rules: {
|
|
31
|
-
...reactHooks.configs.recommended.rules,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
20
|
+
// @ts-expect-error - types are wrong
|
|
21
|
+
reactHooks.configs.flat["recommended-latest"],
|
|
34
22
|
|
|
35
23
|
// add qlik's recommended react config
|
|
36
24
|
{
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
+
* Overrides for the recommended ruleset we use from eslint-plugin-react-hooks.
|
|
5
|
+
*
|
|
4
6
|
* @satisfies {import("../../types/index.js").ESLintFlatConfig["rules"]}
|
|
5
7
|
*/
|
|
6
8
|
const rules = {
|
|
7
|
-
// Enforce Rules of Hooks
|
|
8
|
-
// https://github.com/facebook/react/blob/c11015ff4f610ac2924d1fc6d569a17657a404fd/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
|
|
9
|
-
"react-hooks/rules-of-hooks": "error",
|
|
10
|
-
|
|
11
|
-
// Verify the list of the dependencies for Hooks like useEffect and similar
|
|
12
|
-
// https://github.com/facebook/react/blob/1204c789776cb01fbaf3e9f032e7e2ba85a44137/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
|
|
13
9
|
"react-hooks/exhaustive-deps": "error",
|
|
14
10
|
};
|
|
15
11
|
|