mirror of
https://github.com/facebook/react.git
synced 2026-02-26 07:55:55 +00:00
This reverts commitb34b750729. This hack doesn't play well internally so I'm reverting this for now (but keeping the compilationMode override). I'll audit the locations we report later and try to make them more accurate so we won't need this workaround. ghstack-source-id:b6be29c11dPull Request resolved: https://github.com/facebook/react/pull/30792
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/react-compiler": "error"
}
}
Rules
TODO: Run eslint-doc-generator to generate the rules list.