[eprh] Fix recommended config for flat config compatibility (#34700)

Previously, the `recommended` config used the legacy ESLint format
(plugins as an array of strings). This causes errors when used with
ESLint v9's `defineConfig()` helper. This was following [eslint's own
docs](https://eslint.org/docs/latest/extend/plugins#backwards-compatibility-for-legacy-configs):

> With this approach, both configuration systems recognize
"recommended". The old config system uses the recommended key while the
current config system uses the flat/recommended key. The defineConfig()
helper first looks at the recommended key, and if that is not in the
correct format, it looks for the flat/recommended key. This allows you
an upgrade path if you’d later like to rename flat/recommended to
recommended when you no longer need to support the old config system.

However,
[`isLegacyConfig()`](https://github.com/eslint/rewrite/blob/main/packages/config-helpers/src/define-config.js#L73-L81)
(also see
[`eslintrcKeys`](https://github.com/eslint/rewrite/blob/main/packages/config-helpers/src/define-config.js#L24-L35))
function doesn't check for the `plugins` key, so our config was
incorrectly treated as flat config despite being in legacy format.

This PR fixes the issue, along with a few other fixes combined:

1. Convert `recommended` to flat config format
2. Separate basic rules (exhaustive-deps, rules-of-hooks) from compiler
rules
3. Add `recommended-latest-legacy` config for non-flat config users who
want all recommended rules (including compiler rules)
4. Adding more types for the exported config

Our shipped presets in 6.x.x will essentially be:
- `recommended-legacy`: legacy (non-flat), with basic rules only
- `recommended-latest-legacy`: legacy (non-flat), all rules (basic +
compiler)
- `flat/recommended`: flat, basic rules only (now the same as
recommended, but to avoid making a breaking change we'll just keep it
around in 6.x.x)
- `recommended-latest`: flat, all rules (basic + compiler)
- `recommended`: flat, basic rules only

In the next breaking release 7.x.x, we will collapse down the presets
into three:

- `recommended-legacy`: all recommended rules
- `recommended`: all recommended rules
- `recommended-experimental`: all recommended rules + new bleeding edge
experimental rules

Closes #34679

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34700).
* #34703
* __->__ #34700

DiffTrain build for [26b177bc5e](https://github.com/facebook/react/commit/26b177bc5e1d287c60c50fc1e185b2fb398488a0)
This commit is contained in:
poteto
2025-10-02 15:59:08 -07:00
parent 0f22366d06
commit 2be83ff87e
27 changed files with 151 additions and 113 deletions
+1 -1
View File
@@ -1 +1 @@
19.3.0-native-fb-056a5869-20251002
19.3.0-native-fb-26b177bc-20251002
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9b8f8aa14dece1d79227055afb6f6308>>
* @generated SignedSource<<e9b9d1414e42338190d13bdec3994f49>>
*/
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1d9b9e71b82344c99890852d873ecf7e>>
* @generated SignedSource<<8b10dba5554d96403b555badf845e71e>>
*/
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1d9b9e71b82344c99890852d873ecf7e>>
* @generated SignedSource<<8b10dba5554d96403b555badf845e71e>>
*/
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<32f267191a7c2a562575a75152700630>>
* @generated SignedSource<<9330053539b3dd0b1569f75da93f0596>>
*/
/*
@@ -30061,11 +30061,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.3.0-native-fb-056a5869-20251002" !== isomorphicReactPackageVersion)
if ("19.3.0-native-fb-26b177bc-20251002" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.3.0-native-fb-056a5869-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.3.0-native-fb-26b177bc-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -30102,10 +30102,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30255,5 +30255,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0f0545cf2d1108148bcb24ec7201b061>>
* @generated SignedSource<<5c85aa1c2bf41b3432434211a26292bd>>
*/
/*
@@ -17578,14 +17578,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2059 = React.version;
if (
"19.3.0-native-fb-056a5869-20251002" !==
"19.3.0-native-fb-26b177bc-20251002" !==
isomorphicReactPackageVersion$jscomp$inline_2059
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2059,
"19.3.0-native-fb-056a5869-20251002"
"19.3.0-native-fb-26b177bc-20251002"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17607,10 +17607,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2636 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2637 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17717,4 +17717,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<bc619aa6d46ef9d650f302ab18b8d60b>>
* @generated SignedSource<<91dfecdca3d24e46b3ee5ed560907f96>>
*/
/*
@@ -19716,14 +19716,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2374 = React.version;
if (
"19.3.0-native-fb-056a5869-20251002" !==
"19.3.0-native-fb-26b177bc-20251002" !==
isomorphicReactPackageVersion$jscomp$inline_2374
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2374,
"19.3.0-native-fb-056a5869-20251002"
"19.3.0-native-fb-26b177bc-20251002"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19745,10 +19745,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2381 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002",
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$331 = 0;
@@ -19871,4 +19871,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8193bf484c4c6ce5665e176d03b7e50f>>
* @generated SignedSource<<f10e7fbffbc009bf01f1b4f50e687aa6>>
*/
/*
@@ -30117,11 +30117,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.3.0-native-fb-056a5869-20251002" !== isomorphicReactPackageVersion)
if ("19.3.0-native-fb-26b177bc-20251002" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.3.0-native-fb-056a5869-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.3.0-native-fb-26b177bc-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -30158,10 +30158,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30627,7 +30627,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a70e657b5d4673e5baf62df7ed937aff>>
* @generated SignedSource<<b8d0a8fb67b4ad7d0079a937849e016a>>
*/
/*
@@ -17589,14 +17589,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2060 = React.version;
if (
"19.3.0-native-fb-056a5869-20251002" !==
"19.3.0-native-fb-26b177bc-20251002" !==
isomorphicReactPackageVersion$jscomp$inline_2060
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2060,
"19.3.0-native-fb-056a5869-20251002"
"19.3.0-native-fb-26b177bc-20251002"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17618,10 +17618,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2639 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2640 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17881,4 +17881,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a0cda2e2af477fdc8d5f2499e2e4eecc>>
* @generated SignedSource<<c8ae2229f63b907feefec8dbf5e5e293>>
*/
/*
@@ -19731,14 +19731,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2375 = React.version;
if (
"19.3.0-native-fb-056a5869-20251002" !==
"19.3.0-native-fb-26b177bc-20251002" !==
isomorphicReactPackageVersion$jscomp$inline_2375
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2375,
"19.3.0-native-fb-056a5869-20251002"
"19.3.0-native-fb-26b177bc-20251002"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19760,10 +19760,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2382 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002",
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$331 = 0;
@@ -20039,7 +20039,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<73f7f7bdf106b12be42c5be44cda357b>>
* @generated SignedSource<<136d47f613273b0df942f8f06fbf9755>>
*/
"use strict";
@@ -16015,10 +16015,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16164,5 +16164,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2664e6f85bc8930edd649291b7a18e7e>>
* @generated SignedSource<<ad33d0340a5cce715320c6cb884aeb6b>>
*/
"use strict";
@@ -10105,10 +10105,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1493 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1494 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10244,4 +10244,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2d7b6899118f6f0d5dceeb13bfc8e9fc>>
* @generated SignedSource<<f3356849d4b5dc70fc404faebce0a0fa>>
*/
"use strict";
@@ -10726,10 +10726,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1274 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002",
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$146 = 0;
@@ -10880,4 +10880,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<22bc1cc381e22f86c5dd6cadcff39995>>
* @generated SignedSource<<b67d6b8c14040dad1b07866669895bd8>>
*/
"use strict";
@@ -1400,7 +1400,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2e5cbe6e6566d7ba6eb49cfadf63eb54>>
* @generated SignedSource<<9a10073bc6f7d84f72b2a808ef9921cd>>
*/
"use strict";
@@ -583,4 +583,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1e169ec3f80bcdefb577018afbf1d47b>>
* @generated SignedSource<<34e2e35ce8ecb462ca195bd80c329baf>>
*/
"use strict";
@@ -587,7 +587,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.3.0-native-fb-056a5869-20251002";
exports.version = "19.3.0-native-fb-26b177bc-20251002";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
056a586928fe1b6186d3693743ac7019ce39cb7b
26b177bc5e1d287c60c50fc1e185b2fb398488a0
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<cac8e7a08ee6eb02af204cca42acb6d1>>
* @generated SignedSource<<1a9ab474fb7cc65349020675941a92ee>>
*/
"use strict";
@@ -20000,10 +20000,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0b83ea371227ad291774be383a47edbc>>
* @generated SignedSource<<911e2888951eccc70cf0f18a3a56a270>>
*/
"use strict";
@@ -11256,10 +11256,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1319 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1319.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0cc4018543bf5290edf5f630f2106d2e>>
* @generated SignedSource<<4324bf75954cf7887e96e3a67a6e231f>>
*/
"use strict";
@@ -13320,10 +13320,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1627 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1627.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<94afecc3fc7edd7dd70cfb6c564d8c03>>
* @generated SignedSource<<961efcc40689b2f27c68e2a1cc30966c>>
*/
"use strict";
@@ -20292,11 +20292,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.3.0-native-fb-056a5869-20251002" !== isomorphicReactPackageVersion)
if ("19.3.0-native-fb-26b177bc-20251002" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.3.0-native-fb-056a5869-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.3.0-native-fb-26b177bc-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -20322,10 +20322,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e1304ff97948167f364dda267afff4b6>>
* @generated SignedSource<<8a167fadd425a64db229a72a19fecfe1>>
*/
"use strict";
@@ -11426,11 +11426,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.3.0-native-fb-056a5869-20251002" !== isomorphicReactPackageVersion)
if ("19.3.0-native-fb-26b177bc-20251002" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.3.0-native-fb-056a5869-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.3.0-native-fb-26b177bc-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11480,10 +11480,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1326 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1326.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2f74a7133b1477cc6b0937ba6b317a83>>
* @generated SignedSource<<a59727e813ced66bd94bf051a98c5ca4>>
*/
"use strict";
@@ -13483,11 +13483,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.3.0-native-fb-056a5869-20251002" !== isomorphicReactPackageVersion)
if ("19.3.0-native-fb-26b177bc-20251002" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.3.0-native-fb-056a5869-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.3.0-native-fb-26b177bc-20251002\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -13537,10 +13537,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1634 = {
bundleType: 0,
version: "19.3.0-native-fb-056a5869-20251002",
version: "19.3.0-native-fb-26b177bc-20251002",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.3.0-native-fb-056a5869-20251002"
reconcilerVersion: "19.3.0-native-fb-26b177bc-20251002"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1634.rendererConfig = extraDevToolsConfig);
@@ -1,11 +1,10 @@
import * as estree from 'estree';
import { Rule } from 'eslint';
import { Rule, Linter } from 'eslint';
declare const plugin: {
meta: {
name: string;
};
configs: {};
rules: {
'exhaustive-deps': {
meta: {
@@ -73,6 +72,19 @@ declare const plugin: {
};
};
};
configs: {
"recommended-legacy": {
plugins: Array<string>;
rules: Linter.RulesRecord;
};
"recommended-latest-legacy": {
plugins: Array<string>;
rules: Linter.RulesRecord;
};
"flat/recommended": Array<Linter.Config>;
"recommended-latest": Array<Linter.Config>;
recommended: Array<Linter.Config>;
};
};
export { plugin as default };
@@ -12,7 +12,7 @@
* @lightSyntaxTransform
* @preventMunge
* @oncall react_core
* @generated SignedSource<<6d76935ecb0eb4c3d8e0a65bef9ea142>>
* @generated SignedSource<<e9e590e6b94762d80c7ee846f5e97f61>>
*/
'use strict';
@@ -57811,30 +57811,39 @@ function last(array) {
}
const rules = Object.assign({ 'exhaustive-deps': rule$1, 'rules-of-hooks': rule }, Object.fromEntries(Object.entries(allRules).map(([name, config]) => [name, config.rule])));
const ruleConfigs = Object.assign({ 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn' }, Object.fromEntries(Object.entries(recommendedRules).map(([name, ruleConfig]) => {
const basicRuleConfigs = {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
};
const compilerRuleConfigs = Object.fromEntries(Object.entries(recommendedRules).map(([name, ruleConfig]) => {
return [
'react-hooks/' + name,
`react-hooks/${name}`,
mapErrorSeverityToESlint(ruleConfig.severity),
];
})));
}));
const allRuleConfigs = Object.assign(Object.assign({}, basicRuleConfigs), compilerRuleConfigs);
const plugin = {
meta: {
name: 'eslint-plugin-react-hooks',
},
configs: {},
rules,
configs: {},
};
Object.assign(plugin.configs, {
'recommended-legacy': {
plugins: ['react-hooks'],
rules: ruleConfigs,
rules: basicRuleConfigs,
},
'recommended-latest-legacy': {
plugins: ['react-hooks'],
rules: allRuleConfigs,
},
'flat/recommended': [
{
plugins: {
'react-hooks': plugin,
},
rules: ruleConfigs,
rules: basicRuleConfigs,
},
],
'recommended-latest': [
@@ -57842,13 +57851,17 @@ Object.assign(plugin.configs, {
plugins: {
'react-hooks': plugin,
},
rules: ruleConfigs,
rules: allRuleConfigs,
},
],
recommended: [
{
plugins: {
'react-hooks': plugin,
},
rules: basicRuleConfigs,
},
],
recommended: {
plugins: ['react-hooks'],
rules: ruleConfigs,
},
});
module.exports = plugin;
@@ -6,7 +6,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @generated SignedSource<<3278f07cee68ad70221de87e35984fb4>>
* @generated SignedSource<<ee45ffbad825d82ced243bc4698cdc19>>
*/
'use strict';
@@ -57590,30 +57590,39 @@ function last(array) {
}
const rules = Object.assign({ 'exhaustive-deps': rule$1, 'rules-of-hooks': rule }, Object.fromEntries(Object.entries(allRules).map(([name, config]) => [name, config.rule])));
const ruleConfigs = Object.assign({ 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn' }, Object.fromEntries(Object.entries(recommendedRules).map(([name, ruleConfig]) => {
const basicRuleConfigs = {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
};
const compilerRuleConfigs = Object.fromEntries(Object.entries(recommendedRules).map(([name, ruleConfig]) => {
return [
'react-hooks/' + name,
`react-hooks/${name}`,
mapErrorSeverityToESlint(ruleConfig.severity),
];
})));
}));
const allRuleConfigs = Object.assign(Object.assign({}, basicRuleConfigs), compilerRuleConfigs);
const plugin = {
meta: {
name: 'eslint-plugin-react-hooks',
},
configs: {},
rules,
configs: {},
};
Object.assign(plugin.configs, {
'recommended-legacy': {
plugins: ['react-hooks'],
rules: ruleConfigs,
rules: basicRuleConfigs,
},
'recommended-latest-legacy': {
plugins: ['react-hooks'],
rules: allRuleConfigs,
},
'flat/recommended': [
{
plugins: {
'react-hooks': plugin,
},
rules: ruleConfigs,
rules: basicRuleConfigs,
},
],
'recommended-latest': [
@@ -57621,13 +57630,17 @@ Object.assign(plugin.configs, {
plugins: {
'react-hooks': plugin,
},
rules: ruleConfigs,
rules: allRuleConfigs,
},
],
recommended: [
{
plugins: {
'react-hooks': plugin,
},
rules: basicRuleConfigs,
},
],
recommended: {
plugins: ['react-hooks'],
rules: ruleConfigs,
},
});
module.exports = plugin;
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "0.0.0-experimental-056a5869-20251002",
"version": "0.0.0-experimental-26b177bc-20251002",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",