Skip to content

Commit 4692e23

Browse files
committed
refactor: refine plugin configuration types
- Update plugin exports across all packages to use refined types - Move CompatibleConfig and CompatiblePlugin interfaces to kit package - Update configuration files to use new type structure - Remove outdated documentation for compatibility interfaces
1 parent 0c9fc65 commit 4692e23

File tree

45 files changed

+139
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+139
-149
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## v1.52.9 (2025-08-31)
2+
3+
### 🐞 Fixes
4+
5+
- fix: issue introduced in version [v1.52.7](https://github.com/Rel1cx/eslint-react/releases/tag/v1.52.7) where the `react-hooks-extra` rules were not exported, closes #1207 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/1208
6+
7+
**Full Changelog**: https://github.com/Rel1cx/eslint-react/compare/v1.52.8...v1.52.9
8+
19
## v1.52.8 (2025-08-29)
210

311
### 🐞 Fixes

apps/website/content/docs/changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
title: Changelog
33
---
44

5+
## v1.52.9 (2025-08-31)
6+
7+
### 🐞 Fixes
8+
9+
- fix: issue introduced in version [v1.52.7](https://github.com/Rel1cx/eslint-react/releases/tag/v1.52.7) where the `react-hooks-extra` rules were not exported, closes #1207 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/1208
10+
11+
**Full Changelog**: https://github.com/Rel1cx/eslint-react/compare/v1.52.8...v1.52.9
12+
513
## v1.52.8 (2025-08-29)
614

715
### 🐞 Fixes

examples/react-dom/eslint.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @ts-check
2+
13
import eslintReact from "@eslint-react/eslint-plugin";
24
import eslintJs from "@eslint/js";
35
import eslintPluginReactHooks from "eslint-plugin-react-hooks";

packages/plugins/eslint-plugin-react-debug/src/configs/all.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RulePreset } from "@eslint-react/kit";
1+
import type { RuleConfig } from "@eslint-react/kit";
22
import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared";
33

44
export const name = "react-debug/all";
@@ -9,7 +9,7 @@ export const rules = {
99
"react-debug/hook": "warn",
1010
"react-debug/is-from-react": "warn",
1111
"react-debug/jsx": "warn",
12-
} as const satisfies RulePreset;
12+
} as const satisfies Record<string, RuleConfig>;
1313

1414
export const settings = {
1515
"react-x": DEFAULT_ESLINT_REACT_SETTINGS,

packages/plugins/eslint-plugin-react-debug/src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { RulePreset } from "@eslint-react/kit";
2-
import type { CompatibleConfig } from "@eslint-react/shared";
1+
import type { CompatibleConfig } from "@eslint-react/kit";
32

43
import * as allConfig from "./configs/all";
54
import { plugin } from "./plugin";
@@ -13,7 +12,7 @@ function toFlatConfig(config: CompatibleConfig) {
1312
};
1413
}
1514

16-
function toLegacyConfig({ rules }: { rules: RulePreset }) {
15+
function toLegacyConfig({ rules }: CompatibleConfig) {
1716
return {
1817
plugins: ["react-debug"],
1918
rules,

packages/plugins/eslint-plugin-react-debug/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CompatiblePlugin } from "@eslint-react/shared";
1+
import type { CompatiblePlugin } from "@eslint-react/kit";
22

33
import { name, version } from "../package.json";
44

packages/plugins/eslint-plugin-react-dom/src/configs/recommended.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RulePreset } from "@eslint-react/kit";
1+
import type { RuleConfig } from "@eslint-react/kit";
22
import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared";
33

44
export const name = "react-dom/recommended";
@@ -20,7 +20,7 @@ export const rules = {
2020
"react-dom/no-unsafe-target-blank": "warn",
2121
"react-dom/no-use-form-state": "error",
2222
"react-dom/no-void-elements-with-children": "error",
23-
} as const satisfies RulePreset;
23+
} as const satisfies Record<string, RuleConfig>;
2424

2525
export const settings = {
2626
"react-x": DEFAULT_ESLINT_REACT_SETTINGS,

packages/plugins/eslint-plugin-react-dom/src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { RulePreset } from "@eslint-react/kit";
2-
import type { CompatibleConfig } from "@eslint-react/shared";
1+
import type { CompatibleConfig } from "@eslint-react/kit";
32

43
import * as recommendedConfig from "./configs/recommended";
54
import { plugin } from "./plugin";
@@ -13,7 +12,7 @@ function toFlatConfig(config: CompatibleConfig) {
1312
};
1413
}
1514

16-
function toLegacyConfig({ rules }: { rules: RulePreset }) {
15+
function toLegacyConfig({ rules }: CompatibleConfig) {
1716
return {
1817
plugins: ["react-dom"],
1918
rules,

packages/plugins/eslint-plugin-react-dom/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CompatiblePlugin } from "@eslint-react/shared";
1+
import type { CompatiblePlugin } from "@eslint-react/kit";
22

33
import { name, version } from "../package.json";
44

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { RulePreset } from "@eslint-react/kit";
1+
import type { RuleConfig } from "@eslint-react/kit";
22

33
export const name = "react-hooks-extra/recommended";
44

55
export const rules = {
66
"react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
7-
} as const satisfies RulePreset;
7+
} as const satisfies Record<string, RuleConfig>;

0 commit comments

Comments
 (0)