@pob/eslint-config-typescript-react 58.0.2 → 59.0.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,38 @@
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.0.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v58.1.0...v59.0.0) (2024-11-26)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * drop node 18
11
+ * drop compat now that all used eslint plugins supports eslint 9
12
+
13
+ ### Features
14
+
15
+ * drop compat now that all used eslint plugins supports eslint 9 ([1f6031c](https://github.com/christophehurpeau/eslint-config-pob/commit/1f6031c7c22335044866b2fce15cd72c7c9af721))
16
+ * enable import/consistent-type-specifier-style ([b71e558](https://github.com/christophehurpeau/eslint-config-pob/commit/b71e55848f11e7d4c75ef98d61a4729ece732279))
17
+ * enable sort-imports ([d61be03](https://github.com/christophehurpeau/eslint-config-pob/commit/d61be03ceaedde94d6d95c518c8cdbbb13f7ef61))
18
+
19
+ ### Miscellaneous Chores
20
+
21
+ * update dev deps and require node 20 ([cbe9fb1](https://github.com/christophehurpeau/eslint-config-pob/commit/cbe9fb15f719edb50251f925ff19b987a159b530))
22
+
23
+ Version bump for dependency: @pob/eslint-config
24
+ Version bump for dependency: @pob/eslint-config-typescript
25
+ Version bump for dependency: @pob/eslint-plugin
26
+
27
+
28
+ ## [58.1.0](https://github.com/christophehurpeau/eslint-config-pob/compare/v58.0.2...v58.1.0) (2024-09-09)
29
+
30
+ ### Features
31
+
32
+ * add allowImplicitReturnType, export applyTs ([db24775](https://github.com/christophehurpeau/eslint-config-pob/commit/db2477515d0156ed01c1c1c14ae209c4e66e63cb))
33
+
34
+ Version bump for dependency: @pob/eslint-config
35
+ Version bump for dependency: @pob/eslint-config-typescript
36
+
37
+
6
38
  ## [58.0.2](https://github.com/christophehurpeau/eslint-config-pob/compare/v58.0.1...v58.0.2) (2024-09-07)
7
39
 
8
40
  Version bump for dependency: @pob/eslint-config
package/lib/index.js CHANGED
@@ -7,8 +7,10 @@ import jsxA11yConfigs from "./plugins/jsx-a11y.js";
7
7
  import reactHooksConfigs from "./plugins/react-hooks.js";
8
8
  import reactConfigs from "./plugins/react.js";
9
9
 
10
- export default (url) => {
11
- const { compat, configs } = baseTypescriptPobConfig(url);
10
+ export { apply, applyTs } from "@pob/eslint-config-typescript";
11
+
12
+ export default () => {
13
+ const { configs } = baseTypescriptPobConfig();
12
14
 
13
15
  const createConfig = (base) => [
14
16
  ...base,
@@ -16,7 +18,7 @@ export default (url) => {
16
18
 
17
19
  ...[
18
20
  pobPlugin.configs.react,
19
- ...compat.config({
21
+ {
20
22
  settings: {
21
23
  "import/resolver": {
22
24
  node: {
@@ -48,9 +50,9 @@ export default (url) => {
48
50
  ],
49
51
  "react/jsx-filename-extension": ["error", { extensions: ["tsx"] }],
50
52
  },
51
- }),
52
- ...reactConfigs(compat),
53
- ...reactHooksConfigs(compat),
53
+ },
54
+ ...reactConfigs,
55
+ ...reactHooksConfigs,
54
56
  ...jsxA11yConfigs,
55
57
  ].map((config) => ({
56
58
  ...config,
@@ -58,16 +60,16 @@ export default (url) => {
58
60
  })),
59
61
  ];
60
62
  return {
61
- compat,
62
63
  configs: {
63
64
  base: createConfig(configs.base),
64
65
  node: createConfig(configs.node),
65
66
 
66
67
  allowUnsafe: configs.allowUnsafe,
68
+ allowImplicitReturnType: configs.allowImplicitReturnType,
67
69
  app: configs.app,
68
70
 
69
71
  "react-native": [
70
- ...compat.config({
72
+ {
71
73
  settings: {
72
74
  "import/resolver": {
73
75
  node: {
@@ -75,11 +77,11 @@ export default (url) => {
75
77
  },
76
78
  },
77
79
  },
78
- }),
80
+ },
79
81
  ],
80
82
 
81
83
  "react-native-web": [
82
- ...compat.config({
84
+ {
83
85
  settings: {
84
86
  "import/resolver": {
85
87
  node: {
@@ -98,7 +100,7 @@ export default (url) => {
98
100
  },
99
101
  ],
100
102
  },
101
- }),
103
+ },
102
104
  ],
103
105
  },
104
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.0.2",
3
+ "version": "59.0.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.0.2",
42
- "@pob/eslint-config-typescript": "58.0.2",
43
- "@pob/eslint-plugin": "58.0.2",
44
- "eslint-plugin-import": "2.29.1",
45
- "eslint-plugin-jsx-a11y": "6.9.0",
46
- "eslint-plugin-react": "7.35.0",
47
- "eslint-plugin-react-hooks": "4.6.2"
40
+ "@pob/eslint-config": "59.0.0",
41
+ "@pob/eslint-config-typescript": "59.0.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
  }