mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 12:20:38 +01:00
Exporting the hermes parser breaks the playground as the hermes parser can not work in the browser. No one is using this directly anyway -- snap and others bundle hermes parser on their own, so, let's remove it. ghstack-source-id: d448c346eb137f8ba6ada4ad113e41a90b29baff Pull Request resolved: https://github.com/facebook/react-forget/pull/2890 |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| src | ||
| babel.config.js | ||
| package.json | ||
| README.md | ||
| rollup.config.js | ||
| tsconfig.json | ||
eslint-plugin-react-compiler
ESLint plugin surfacing problematic React code found by the React compiler.
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-react-compiler:
npm install eslint-plugin-react-compiler --save-dev
Usage
Add react-compiler to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"react-compiler"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"react-compiler/rule-name": 2
}
}
Rules
TODO: Run eslint-doc-generator to generate the rules list.