Skip to content

Commit

Permalink
[WIP] Experimental React Compiler support.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer committed May 15, 2024
1 parent 89a4693 commit f208b47
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = {
},
},
],
plugins: ['@deities'],
plugins: ['@deities', 'react-compiler'],
rules: {
'@typescript-eslint/no-restricted-imports': [
2,
Expand Down Expand Up @@ -103,5 +103,6 @@ module.exports = {
],
'no-extra-parens': 0,
'no-restricted-globals': [2, 'alert', 'confirm'],
'react-compiler/react-compiler': 2,
},
};
1 change: 1 addition & 0 deletions hera/types/babel-plugin-react-compiler.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'babel-plugin-react-compiler';
2 changes: 2 additions & 0 deletions infra/babelPlugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { join } from 'node:path';
import babelPluginFbt from 'babel-plugin-fbt';
import babelPluginFbtImport from 'babel-plugin-fbt-import';
import babelPluginFbtRuntime from 'babel-plugin-fbt-runtime';
import babelPluginReactCompiler from 'babel-plugin-react-compiler';
import isOpenSource from './isOpenSource.tsx';
import root from './root.ts';

Expand All @@ -17,6 +18,7 @@ const enumManifest = (() => {
})();

export default [
babelPluginReactCompiler,
babelPluginFbtImport,
[
babelPluginFbt,
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@
"babel-plugin-fbt": "^1.0.0",
"babel-plugin-fbt-import": "^0.1.0",
"babel-plugin-fbt-runtime": "^1.0.0",
"babel-plugin-react-compiler": "0.0.0-experimental-4690415-20240515",
"chalk": "^5.3.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-plugin-react-compiler": "0.0.0-experimental-e04a001-20240515",
"nodemon": "^3.1.0",
"npm-run-all2": "^6.1.2",
"prettier": "4.0.0-alpha.8",
Expand Down Expand Up @@ -109,6 +111,7 @@
"patchedDependencies": {
"@remix-run/[email protected]": "patches/@[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/eslint-plugin-react-compiler@0.0.0-experimental-e04a001-20240515.patch",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/package.json b/package.json
index dfc570d017042b9066863054d40200c28c5e8947..219b6071176714448fc018063643a301e0d59a7c 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "eslint-plugin-react-compiler",
"version": "0.0.0-experimental-e04a001-20240515",
"description": "ESLint plugin to display errors found by the React compiler.",
+ "main": "dist/index.js",
"scripts": {
"build": "rimraf dist && rollup --config --bundleConfigAsCjs",
"test": "tsc && jest"
Loading

0 comments on commit f208b47

Please sign in to comment.