Skip to content

Commit 5147a62

Browse files
Rel1cxCopilot
andauthored
Fix sub-plugin's READMEs (#1465)
Signed-off-by: REL1CX <solarflamex@hotmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7d10b54 commit 5147a62

7 files changed

Lines changed: 26 additions & 42 deletions

File tree

packages/plugins/eslint-plugin-react-debug/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@ npm install --save-dev eslint-plugin-react-debug
1313

1414
## Setup
1515

16-
```js
17-
// eslint.config.js
18-
19-
// @ts-check
16+
```ts
2017
import js from "@eslint/js";
21-
import reactDebug from "eslint-plugin-react-debug";
18+
import debug from "eslint-plugin-react-debug";
2219
import { defineConfig } from "eslint/config";
2320
import tseslint from "typescript-eslint";
2421

@@ -28,7 +25,8 @@ export default defineConfig(
2825
extends: [
2926
js.configs.recommended,
3027
tseslint.configs.recommended,
31-
reactDebug.configs.all,
28+
// Add this plugin's config below js/tseslint configs
29+
debug.configs.all,
3230
],
3331
rules: {
3432
// Put rules you want to override here

packages/plugins/eslint-plugin-react-dom/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ npm install --save-dev eslint-plugin-react-dom
1111

1212
## Setup
1313

14-
```js
15-
// eslint.config.js
16-
17-
// @ts-check
14+
```ts
1815
import js from "@eslint/js";
19-
import reactDom from "eslint-plugin-react-dom";
16+
import dom from "eslint-plugin-react-dom";
2017
import { defineConfig } from "eslint/config";
2118
import tseslint from "typescript-eslint";
2219

@@ -26,7 +23,8 @@ export default defineConfig(
2623
extends: [
2724
js.configs.recommended,
2825
tseslint.configs.recommended,
29-
reactDom.configs.recommended,
26+
// Add this plugin's config below js/tseslint configs
27+
dom.configs.recommended,
3028
],
3129
rules: {
3230
// Put rules you want to override here

packages/plugins/eslint-plugin-react-hooks-extra/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ npm install --save-dev eslint-plugin-react-hooks-extra
1111

1212
## Setup
1313

14-
```js
15-
// eslint.config.js
16-
17-
// @ts-check
14+
```ts
1815
import js from "@eslint/js";
19-
import reactHooksExtra from "eslint-plugin-react-hooks-extra";
16+
import hooksExtra from "eslint-plugin-react-hooks-extra";
2017
import { defineConfig } from "eslint/config";
2118
import tseslint from "typescript-eslint";
2219

@@ -26,7 +23,8 @@ export default defineConfig(
2623
extends: [
2724
js.configs.recommended,
2825
tseslint.configs.recommended,
29-
reactHooksExtra.configs.recommended,
26+
// Add this plugin's config below js/tseslint configs
27+
hooksExtra.configs.recommended,
3028
],
3129
rules: {
3230
// Put rules you want to override here

packages/plugins/eslint-plugin-react-naming-convention/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ npm install --save-dev eslint-plugin-react-naming-convention
1111

1212
## Setup
1313

14-
```js
15-
// eslint.config.js
16-
17-
// @ts-check
14+
```ts
1815
import js from "@eslint/js";
19-
import reactNamingConvention from "eslint-plugin-react-naming-convention";
16+
import namingConvention from "eslint-plugin-react-naming-convention";
2017
import { defineConfig } from "eslint/config";
2118
import tseslint from "typescript-eslint";
2219

@@ -26,10 +23,9 @@ export default defineConfig(
2623
extends: [
2724
js.configs.recommended,
2825
tseslint.configs.recommended,
26+
// Add this plugin's config below js/tseslint configs
27+
namingConvention.configs.recommended,
2928
],
30-
plugins: {
31-
"react-naming-convention": reactNamingConvention,
32-
},
3329
rules: {
3430
// Put rules you want to use here
3531
"react-naming-convention/component-name": "warn",

packages/plugins/eslint-plugin-react-rsc/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ npm install --save-dev eslint-plugin-react-rsc
99

1010
## Setup
1111

12-
```js
13-
// eslint.config.js
14-
15-
// @ts-check
12+
```ts
1613
import js from "@eslint/js";
17-
import react from "eslint-plugin-react-x";
14+
import rsc from "eslint-plugin-react-rsc";
1815
import { defineConfig } from "eslint/config";
1916
import tseslint from "typescript-eslint";
2017

@@ -24,7 +21,8 @@ export default defineConfig(
2421
extends: [
2522
js.configs.recommended,
2623
tseslint.configs.recommended,
27-
react.configs.recommended,
24+
// Add this plugin's config below js/tseslint configs
25+
rsc.configs.recommended,
2826
],
2927
rules: {
3028
// Put rules you want to override here

packages/plugins/eslint-plugin-react-web-api/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ npm install --save-dev eslint-plugin-react-web-api
1111

1212
## Setup
1313

14-
```js
15-
// eslint.config.js
16-
17-
// @ts-check
14+
```ts
1815
import js from "@eslint/js";
19-
import reactWebApi from "eslint-plugin-react-web-api";
16+
import webApi from "eslint-plugin-react-web-api";
2017
import { defineConfig } from "eslint/config";
2118
import tseslint from "typescript-eslint";
2219

@@ -26,7 +23,8 @@ export default defineConfig(
2623
extends: [
2724
js.configs.recommended,
2825
tseslint.configs.recommended,
29-
reactWebApi.configs.recommended,
26+
// Add this plugin's config below js/tseslint configs
27+
webApi.configs.recommended,
3028
],
3129
rules: {
3230
// Put rules you want to override here

packages/plugins/eslint-plugin-react-x/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ npm install --save-dev eslint-plugin-react-x
1111

1212
## Setup
1313

14-
```js
15-
// eslint.config.js
16-
17-
// @ts-check
14+
```ts
1815
import js from "@eslint/js";
1916
import react from "eslint-plugin-react-x";
2017
import { defineConfig } from "eslint/config";
@@ -26,6 +23,7 @@ export default defineConfig(
2623
extends: [
2724
js.configs.recommended,
2825
tseslint.configs.recommended,
26+
// Add this plugin's config below js/tseslint configs
2927
react.configs.recommended,
3028
],
3129
rules: {

0 commit comments

Comments
 (0)