Skip to content

Commit

Permalink
Revert "Merge pull request #42287 from margelo/feat/react-compiler"
Browse files Browse the repository at this point in the history
This reverts commit ec443c9, reversing
changes made to 6cc43cf.
  • Loading branch information
MonilBhavsar committed Jun 27, 2024
1 parent cb45773 commit 0c812c3
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 548 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ module.exports = {
'plugin:you-dont-need-lodash-underscore/all',
'prettier',
],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler'],
ignorePatterns: ['lib/**'],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.resolve(__dirname, './tsconfig.json'),
Expand Down Expand Up @@ -188,7 +187,6 @@ module.exports = {
touchables: ['PressableWithoutFeedback', 'PressableWithFeedback'],
},
],
'react-compiler/react-compiler': 'error',

// Disallow usage of certain functions and imports
'no-restricted-syntax': [
Expand Down
285 changes: 123 additions & 162 deletions .github/actions/javascript/authorChecklist/index.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ package-lock.json
*.md
# We need to modify the import here specifically, hence we disable prettier to get rid of the sorted imports
src/libs/E2E/reactNativeLaunchingTest.ts
# Temporary while we keep react-compiler in our repo
lib/**
12 changes: 1 addition & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ require('dotenv').config();

const IS_E2E_TESTING = process.env.E2E_TESTING === 'true';

const ReactCompilerConfig = {
runtimeModule: 'react-compiler-runtime',
};
const defaultPresets = ['@babel/preset-react', '@babel/preset-env', '@babel/preset-flow', '@babel/preset-typescript'];
const defaultPlugins = [
['babel-plugin-react-compiler', ReactCompilerConfig], // must run first!
let defaultPlugins = [
// Adding the commonjs: true option to react-native-web plugin can cause styling conflicts
['react-native-web'],

Expand Down Expand Up @@ -145,11 +141,5 @@ module.exports = (api) => {
const runningIn = api.caller((args = {}) => args.name);
console.debug(' - running in: ', runningIn);

// don't include react-compiler in jest, because otherwise tests will fail
if (runningIn !== 'babel-jest') {
// must run first!
metro.plugins.unshift(['babel-plugin-react-compiler', ReactCompilerConfig]);
}

return ['metro', 'babel-jest'].includes(runningIn) ? metro : webpack;
};
21 changes: 0 additions & 21 deletions lib/react-compiler-runtime/index.js

This file was deleted.

10 changes: 0 additions & 10 deletions lib/react-compiler-runtime/package.json

This file was deleted.

Loading

0 comments on commit 0c812c3

Please sign in to comment.