mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
This change merges the `react-compiler` rule from `eslint-plugin-react-compiler` into the `eslint-plugin-react-hooks` plugin. In order to do the move in a way that keeps commit history with the moved files, but also no remove them from their origin until a future cleanup change can be done, I did the `git mv` first, and then recreated the files that were moved in their original places, as a separate commit. Unfortunately GH shows the moved files as new instead of the ones that are truly new. But in the IDE and `git blame`, commit history is intact with the moved files. Since this change adds new dependencies, and one of those dependencies has a higher `engines` declaration for `node` than what the plugin currently has, this is technically a breaking change and will have to go out as part of a major release. ### Related Changes - https://github.com/facebook/react/pull/32458 --------- Co-authored-by: Lauren Tan <poteto@users.noreply.github.com>
20 lines
702 B
JavaScript
20 lines
702 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* HACK: @poteto React Compiler inlines Zod in its build artifact. Zod spreads values passed to .map
|
|
* which causes issues in @babel/plugin-transform-spread in loose mode, as it will result in
|
|
* {undefined: undefined} which fails to parse.
|
|
*
|
|
* [@babel/plugin-transform-block-scoping', {throwIfClosureRequired: true}] also causes issues with
|
|
* the built version of the compiler. The minimal set of plugins needed for this file is reexported
|
|
* from babel.config-ts.
|
|
*
|
|
* I will remove this hack later when we move eslint-plugin-react-hooks into the compiler directory.
|
|
**/
|
|
|
|
const baseConfig = require('./babel.config-ts');
|
|
|
|
module.exports = {
|
|
plugins: baseConfig.plugins,
|
|
};
|