1- import type { CompatibleConfig , CompatiblePlugin } from "@eslint-react/kit" ;
1+ import type { CompatiblePlugin } from "@eslint-react/kit" ;
22import reactDebug from "eslint-plugin-react-debug" ;
33import reactDom from "eslint-plugin-react-dom" ;
44import reactHooksExtra from "eslint-plugin-react-hooks-extra" ;
@@ -22,13 +22,6 @@ import * as recommendedTypeScriptConfig from "./configs/recommended-typescript";
2222import * as xConfig from "./configs/x" ;
2323import { padKeysLeft } from "./utils" ;
2424
25- function toLegacyConfig ( { rules } : CompatibleConfig ) {
26- return {
27- plugins : [ "@eslint-react" ] ,
28- rules,
29- } ;
30- }
31-
3225const plugin : CompatiblePlugin = {
3326 meta : {
3427 name,
@@ -48,30 +41,17 @@ export default {
4841 ...plugin ,
4942 configs : {
5043 [ "all" ] : allConfig ,
51- [ "all-legacy" ] : toLegacyConfig ( allConfig ) ,
5244 [ "debug" ] : debugConfig ,
53- [ "debug-legacy" ] : toLegacyConfig ( debugConfig ) ,
5445 [ "disable-conflict-eslint-plugin-react" ] : disableConflictEslintPluginReact ,
55- [ "disable-conflict-eslint-plugin-react-legacy" ] : toLegacyConfig ( disableConflictEslintPluginReact ) ,
5646 [ "disable-debug" ] : disableDebugConfig ,
57- [ "disable-debug-legacy" ] : toLegacyConfig ( disableDebugConfig ) ,
5847 [ "disable-dom" ] : disableDomConfig ,
59- [ "disable-dom-legacy" ] : toLegacyConfig ( disableDomConfig ) ,
6048 [ "disable-type-checked" ] : disableTypeCheckedConfig ,
61- [ "disable-type-checked-legacy" ] : toLegacyConfig ( disableTypeCheckedConfig ) ,
6249 [ "disable-web-api" ] : disableWebApiConfig ,
63- [ "disable-web-api-legacy" ] : toLegacyConfig ( disableWebApiConfig ) ,
6450 [ "dom" ] : domConfig ,
65- [ "dom-legacy" ] : toLegacyConfig ( domConfig ) ,
6651 [ "off" ] : offConfig ,
67- [ "off-legacy" ] : toLegacyConfig ( offConfig ) ,
6852 [ "recommended" ] : recommendedConfig ,
69- [ "recommended-legacy" ] : toLegacyConfig ( recommendedConfig ) ,
7053 [ "recommended-type-checked" ] : recommendedTypeCheckedConfig ,
71- [ "recommended-type-checked-legacy" ] : toLegacyConfig ( recommendedTypeCheckedConfig ) ,
7254 [ "recommended-typescript" ] : recommendedTypeScriptConfig ,
73- [ "recommended-typescript-legacy" ] : toLegacyConfig ( recommendedTypeScriptConfig ) ,
7455 [ "x" ] : xConfig ,
75- [ "x-legacy" ] : toLegacyConfig ( xConfig ) ,
7656 } ,
7757} ;
0 commit comments