mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
This PR makes all packages share the same typescript version and updates us to latest versions of typescript, ts-node, typescript-eslint/eslint-plugin and typescript-eslint/parser. I also noticed that the tsconfig we were extending (node18-strictest) was deprecated, so I switched us over to one that's more up to date. Also had to make a couple of small changes to the playground so that continues to build correctly.
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.