@pob/eslint-config-typescript-react 58.1.0 → 59.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/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [59.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v59.0.0...v59.1.0) (2024-11-28)
7
+
8
+ Version bump for dependency: @pob/eslint-config-typescript
9
+
10
+
11
+ ## [59.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v58.1.0...v59.0.0) (2024-11-26)
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * drop node 18
16
+ * drop compat now that all used eslint plugins supports eslint 9
17
+
18
+ ### Features
19
+
20
+ * drop compat now that all used eslint plugins supports eslint 9 ([1f6031c](https://github.com/christophehurpeau/eslint-config-pob/commit/1f6031c7c22335044866b2fce15cd72c7c9af721))
21
+ * enable import/consistent-type-specifier-style ([b71e558](https://github.com/christophehurpeau/eslint-config-pob/commit/b71e55848f11e7d4c75ef98d61a4729ece732279))
22
+ * enable sort-imports ([d61be03](https://github.com/christophehurpeau/eslint-config-pob/commit/d61be03ceaedde94d6d95c518c8cdbbb13f7ef61))
23
+
24
+ ### Miscellaneous Chores
25
+
26
+ * update dev deps and require node 20 ([cbe9fb1](https://github.com/christophehurpeau/eslint-config-pob/commit/cbe9fb15f719edb50251f925ff19b987a159b530))
27
+
28
+ Version bump for dependency: @pob/eslint-config
29
+ Version bump for dependency: @pob/eslint-config-typescript
30
+ Version bump for dependency: @pob/eslint-plugin
31
+
32
+
6
33
  ## [58.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v58.0.2...v58.1.0) (2024-09-09)
7
34
 
8
35
  ### Features
package/lib/index.js CHANGED
@@ -9,8 +9,8 @@ import reactConfigs from "./plugins/react.js";
9
9
 
10
10
  export { apply, applyTs } from "@pob/eslint-config-typescript";
11
11
 
12
- export default (url) => {
13
- const { compat, configs } = baseTypescriptPobConfig(url);
12
+ export default () => {
13
+ const { configs } = baseTypescriptPobConfig();
14
14
 
15
15
  const createConfig = (base) => [
16
16
  ...base,
@@ -18,7 +18,7 @@ export default (url) => {
18
18
 
19
19
  ...[
20
20
  pobPlugin.configs.react,
21
- ...compat.config({
21
+ {
22
22
  settings: {
23
23
  "import/resolver": {
24
24
  node: {
@@ -50,9 +50,9 @@ export default (url) => {
50
50
  ],
51
51
  "react/jsx-filename-extension": ["error", { extensions: ["tsx"] }],
52
52
  },
53
- }),
54
- ...reactConfigs(compat),
55
- ...reactHooksConfigs(compat),
53
+ },
54
+ ...reactConfigs,
55
+ ...reactHooksConfigs,
56
56
  ...jsxA11yConfigs,
57
57
  ].map((config) => ({
58
58
  ...config,
@@ -60,7 +60,6 @@ export default (url) => {
60
60
  })),
61
61
  ];
62
62
  return {
63
- compat,
64
63
  configs: {
65
64
  base: createConfig(configs.base),
66
65
  node: createConfig(configs.node),
@@ -70,7 +69,7 @@ export default (url) => {
70
69
  app: configs.app,
71
70
 
72
71
  "react-native": [
73
- ...compat.config({
72
+ {
74
73
  settings: {
75
74
  "import/resolver": {
76
75
  node: {
@@ -78,11 +77,11 @@ export default (url) => {
78
77
  },
79
78
  },
80
79
  },
81
- }),
80
+ },
82
81
  ],
83
82
 
84
83
  "react-native-web": [
85
- ...compat.config({
84
+ {
86
85
  settings: {
87
86
  "import/resolver": {
88
87
  node: {
@@ -101,7 +100,7 @@ export default (url) => {
101
100
  },
102
101
  ],
103
102
  },
104
- }),
103
+ },
105
104
  ],
106
105
  },
107
106
  };
@@ -1,23 +1,9 @@
1
- import { fixupPluginRules } from "@eslint/compat";
1
+ import pluginReactHooks from "eslint-plugin-react-hooks";
2
2
 
3
- function legacyPlugin(compat, name, alias = name) {
4
- const plugin = compat.plugins(name)[0]?.plugins?.[alias];
5
-
6
- if (!plugin) {
7
- throw new Error(`Unable to resolve plugin ${name} and/or alias ${alias}`);
8
- }
9
-
10
- return fixupPluginRules(plugin);
11
- }
12
-
13
- export default (compat) => [
3
+ export default [
14
4
  {
15
5
  plugins: {
16
- "react-hooks": legacyPlugin(
17
- compat,
18
- "eslint-plugin-react-hooks",
19
- "react-hooks",
20
- ),
6
+ "react-hooks": pluginReactHooks,
21
7
  },
22
8
 
23
9
  rules: {
@@ -1,7 +1,9 @@
1
- export default (compat) =>
2
- compat.config({
3
- extends: ["plugin:react/recommended", "plugin:react/jsx-runtime"],
1
+ import reactPlugin from "eslint-plugin-react";
4
2
 
3
+ export default [
4
+ reactPlugin.configs.flat.recommended,
5
+ reactPlugin.configs.flat["jsx-runtime"],
6
+ {
5
7
  rules: {
6
8
  // https://github.com/airbnb/javascript/issues/2829
7
9
  "func-names": "error",
@@ -181,4 +183,5 @@ export default (compat) =>
181
183
  },
182
184
  ],
183
185
  },
184
- });
186
+ },
187
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/eslint-config-typescript-react",
3
- "version": "58.1.0",
3
+ "version": "59.1.0",
4
4
  "description": "eslint config files",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)",
@@ -13,7 +13,7 @@
13
13
  "homepage": "https://github.com/christophehurpeau/eslint-config-pob",
14
14
  "type": "module",
15
15
  "engines": {
16
- "node": ">=18.18.0"
16
+ "node": ">=20.9.0"
17
17
  },
18
18
  "sideEffects": false,
19
19
  "main": "./lib/index.js",
@@ -37,18 +37,17 @@
37
37
  "eslint": "^9.9.0"
38
38
  },
39
39
  "dependencies": {
40
- "@eslint/compat": "^1.1.1",
41
- "@pob/eslint-config": "58.1.0",
42
- "@pob/eslint-config-typescript": "58.1.0",
43
- "@pob/eslint-plugin": "58.0.2",
44
- "eslint-plugin-import": "2.29.1",
45
- "eslint-plugin-jsx-a11y": "6.10.0",
46
- "eslint-plugin-react": "7.35.2",
47
- "eslint-plugin-react-hooks": "4.6.2"
40
+ "@pob/eslint-config": "59.0.0",
41
+ "@pob/eslint-config-typescript": "59.1.0",
42
+ "@pob/eslint-plugin": "59.0.0",
43
+ "eslint-plugin-import": "2.31.0",
44
+ "eslint-plugin-jsx-a11y": "6.10.2",
45
+ "eslint-plugin-react": "7.37.2",
46
+ "eslint-plugin-react-hooks": "5.0.0"
48
47
  },
49
48
  "devDependencies": {
50
- "@types/react": "18.3.5",
49
+ "@types/react": "18.3.12",
51
50
  "react": "18.3.1",
52
- "typescript": "5.5.4"
51
+ "typescript": "5.6.3"
53
52
  }
54
53
  }