mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[eprh] Move to compiler directory
Moves the plugin into the compiler directory. - Update bundles.js to point to new location for now to keep builds the same - Remove jest.config.js - Replace babel.config.js with copy from eslint-plugin-react-compiler
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
"babel-jest": "^29.0.3",
|
||||
"babel-plugin-fbt": "^1.0.0",
|
||||
"babel-plugin-fbt-runtime": "^1.0.0",
|
||||
"eslint": "^8.57.1",
|
||||
"eslint-v8": "npm:eslint@^8.57.1",
|
||||
"invariant": "^2.2.4",
|
||||
"jest": "^29.0.3",
|
||||
"jest-environment-jsdom": "^29.0.3",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"@types/eslint": "^8.56.12",
|
||||
"@types/node": "^20.2.5",
|
||||
"babel-jest": "^29.0.3",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-v8": "npm:eslint@^8.57.1",
|
||||
"hermes-eslint": "^0.25.1",
|
||||
"jest": "^29.5.0"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
presets: ['@babel/preset-env', '@babel/preset-typescript'],
|
||||
plugins: [
|
||||
['@babel/plugin-transform-private-property-in-object', {loose: true}],
|
||||
['@babel/plugin-transform-class-properties', {loose: true}],
|
||||
['@babel/plugin-transform-private-methods', {loose: true}],
|
||||
],
|
||||
};
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/react.git",
|
||||
"directory": "packages/eslint-plugin-react-hooks"
|
||||
"directory": "compiler/packages/eslint-plugin-react-hooks"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
@@ -21,7 +21,7 @@
|
||||
"react"
|
||||
],
|
||||
"scripts": {
|
||||
"build:compiler": "cd ../../compiler && yarn workspace babel-plugin-react-compiler build",
|
||||
"build:compiler": "yarn workspace babel-plugin-react-compiler build",
|
||||
"test": "yarn build:compiler && jest",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
+639
-86
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* This file is purely being used for local jest runs, and doesn't participate in the build process.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
extends: '../../babel.config-ts.js',
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
process.env.NODE_ENV = 'development';
|
||||
|
||||
module.exports = {
|
||||
setupFiles: [require.resolve('../../scripts/jest/setupEnvironment.js')],
|
||||
moduleFileExtensions: ['ts', 'js', 'json'],
|
||||
};
|
||||
@@ -1191,12 +1191,12 @@ const bundles = [
|
||||
name: 'eslint-plugin-react-hooks',
|
||||
bundleTypes: [NODE_DEV, NODE_PROD, CJS_DTS],
|
||||
moduleType: ISOMORPHIC,
|
||||
entry: 'eslint-plugin-react-hooks/src/index.ts',
|
||||
entry: '../../compiler/packages/eslint-plugin-react-hooks/src/index.ts',
|
||||
global: 'ESLintPluginReactHooks',
|
||||
minifyWithProdErrorCodes: false,
|
||||
wrapWithModuleBoundaries: false,
|
||||
externals: [],
|
||||
tsconfig: './packages/eslint-plugin-react-hooks/tsconfig.json',
|
||||
tsconfig: './compiler/packages/eslint-plugin-react-hooks/tsconfig.json',
|
||||
prebuild: `mkdir -p ./compiler/packages/babel-plugin-react-compiler/dist && echo "module.exports = require('../src/index.ts');" > ./compiler/packages/babel-plugin-react-compiler/dist/index.js`,
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user