Skip to content

Commit c25a671

Browse files
committed
feat(eslint-plugin-react-hooks): convert to typescript and package type declarations (#32240)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary This change converts the eslint hooks plugin to typescript, which also allows us to include type declarations in the package, for those using [typescript eslint configs](https://eslint.org/blog/2025/01/eslint-v9.18.0-released/#stable-typescript-configuration-file-support). ### Constituent changes that should land before this one - [x] ~#32276 - [x] #32279 - [x] #32283 - [x] #32393 - [x] #32396 Closes #30119 --------- Co-authored-by: Lauren Tan <poteto@users.noreply.github.com> DiffTrain build for [5adf402](5adf402)
1 parent 08859f9 commit c25a671

35 files changed

+2404
-2167
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a53da6abe1593483098df2baf927fe07d80153a5
1+
5adf40208f4a2f56bda5c059d18ce578c5091dab
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a53da6abe1593483098df2baf927fe07d80153a5
1+
5adf40208f4a2f56bda5c059d18ce578c5091dab

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ __DEV__ &&
19861986
exports.useTransition = function () {
19871987
return resolveDispatcher().useTransition();
19881988
};
1989-
exports.version = "19.1.0-www-classic-a53da6ab-20250213";
1989+
exports.version = "19.1.0-www-classic-5adf4020-20250216";
19901990
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19911991
"function" ===
19921992
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ __DEV__ &&
19861986
exports.useTransition = function () {
19871987
return resolveDispatcher().useTransition();
19881988
};
1989-
exports.version = "19.1.0-www-modern-a53da6ab-20250213";
1989+
exports.version = "19.1.0-www-modern-5adf4020-20250216";
19901990
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19911991
"function" ===
19921992
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,4 +641,4 @@ exports.useSyncExternalStore = function (
641641
exports.useTransition = function () {
642642
return ReactSharedInternals.H.useTransition();
643643
};
644-
exports.version = "19.1.0-www-classic-a53da6ab-20250213";
644+
exports.version = "19.1.0-www-classic-5adf4020-20250216";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,4 +641,4 @@ exports.useSyncExternalStore = function (
641641
exports.useTransition = function () {
642642
return ReactSharedInternals.H.useTransition();
643643
};
644-
exports.version = "19.1.0-www-modern-a53da6ab-20250213";
644+
exports.version = "19.1.0-www-modern-5adf4020-20250216";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
645645
exports.useTransition = function () {
646646
return ReactSharedInternals.H.useTransition();
647647
};
648-
exports.version = "19.1.0-www-classic-a53da6ab-20250213";
648+
exports.version = "19.1.0-www-classic-5adf4020-20250216";
649649
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
650650
"function" ===
651651
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
645645
exports.useTransition = function () {
646646
return ReactSharedInternals.H.useTransition();
647647
};
648-
exports.version = "19.1.0-www-modern-a53da6ab-20250213";
648+
exports.version = "19.1.0-www-modern-5adf4020-20250216";
649649
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
650650
"function" ===
651651
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17394,10 +17394,10 @@ __DEV__ &&
1739417394
(function () {
1739517395
var internals = {
1739617396
bundleType: 1,
17397-
version: "19.1.0-www-classic-a53da6ab-20250213",
17397+
version: "19.1.0-www-classic-5adf4020-20250216",
1739817398
rendererPackageName: "react-art",
1739917399
currentDispatcherRef: ReactSharedInternals,
17400-
reconcilerVersion: "19.1.0-www-classic-a53da6ab-20250213"
17400+
reconcilerVersion: "19.1.0-www-classic-5adf4020-20250216"
1740117401
};
1740217402
internals.overrideHookState = overrideHookState;
1740317403
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17431,7 +17431,7 @@ __DEV__ &&
1743117431
exports.Shape = Shape;
1743217432
exports.Surface = Surface;
1743317433
exports.Text = Text;
17434-
exports.version = "19.1.0-www-classic-a53da6ab-20250213";
17434+
exports.version = "19.1.0-www-classic-5adf4020-20250216";
1743517435
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1743617436
"function" ===
1743717437
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17166,10 +17166,10 @@ __DEV__ &&
1716617166
(function () {
1716717167
var internals = {
1716817168
bundleType: 1,
17169-
version: "19.1.0-www-modern-a53da6ab-20250213",
17169+
version: "19.1.0-www-modern-5adf4020-20250216",
1717017170
rendererPackageName: "react-art",
1717117171
currentDispatcherRef: ReactSharedInternals,
17172-
reconcilerVersion: "19.1.0-www-modern-a53da6ab-20250213"
17172+
reconcilerVersion: "19.1.0-www-modern-5adf4020-20250216"
1717317173
};
1717417174
internals.overrideHookState = overrideHookState;
1717517175
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17203,7 +17203,7 @@ __DEV__ &&
1720317203
exports.Shape = Shape;
1720417204
exports.Surface = Surface;
1720517205
exports.Text = Text;
17206-
exports.version = "19.1.0-www-modern-a53da6ab-20250213";
17206+
exports.version = "19.1.0-www-modern-5adf4020-20250216";
1720717207
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1720817208
"function" ===
1720917209
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)