eslint-plugin-react-compiler
Advanced tools
Comparing version 0.0.0-experimental-dc8bd44-20241121 to 0.0.0-experimental-decd7b8-20250118
{ | ||
"name": "eslint-plugin-react-compiler", | ||
"version": "0.0.0-experimental-dc8bd44-20241121", | ||
"version": "0.0.0-experimental-decd7b8-20250118", | ||
"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" | ||
"build": "rimraf dist && scripts/build.js", | ||
"test": "tsc && jest", | ||
"watch": "scripts/build.js --watch" | ||
}, | ||
@@ -10,0 +11,0 @@ "files": [ |
@@ -21,4 +21,21 @@ # eslint-plugin-react-compiler | ||
Add `react-compiler` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: | ||
### Flat config | ||
Edit your eslint 8+ config (for example `eslint.config.mjs`) with the recommended configuration: | ||
```diff | ||
+ import reactCompiler from "eslint-plugin-react-compiler" | ||
import react from "eslint-plugin-react" | ||
export default [ | ||
// Your existing config | ||
{ ...pluginReact.configs.flat.recommended, settings: { react: { version: "detect" } } }, | ||
+ reactCompiler.config.recommended | ||
] | ||
``` | ||
### Legacy config (`.eslintrc`) | ||
Add `react-compiler` to the plugins section of your configuration file. You can omit the `eslint-plugin-` prefix: | ||
```json | ||
@@ -25,0 +42,0 @@ { |
Sorry, the diff of this file is too big to display
8451525
4
81006
64