From ba92e76e2295a9b13dd23d19b50c836048648eba Mon Sep 17 00:00:00 2001 From: Eva1ent Date: Thu, 12 Sep 2024 11:09:14 +0800 Subject: [PATCH] docs: improve setup guide in README.md --- README.md | 45 ------------------- .../eslint-plugin-react-debug/README.md | 2 - .../plugins/eslint-plugin-react-dom/README.md | 2 - .../eslint-plugin-react-hooks-extra/README.md | 2 - .../README.md | 2 - .../eslint-plugin-react-web-api/README.md | 2 - .../plugins/eslint-plugin-react-x/README.md | 2 - packages/plugins/eslint-plugin/README.md | 45 ------------------- 8 files changed, 102 deletions(-) diff --git a/README.md b/README.md index cd01ff9f2..216abd2cd 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,6 @@ pnpm add --save-dev @eslint-react/eslint-plugin ### Flat Config -Add the plugin to your `eslint.config.js`: - ```js // @ts-check @@ -97,29 +95,6 @@ export default [ ]; ``` -### Legacy Config - -
-Click to toggle contents - -Add the plugin to your `.eslintrc.json`: - -```json -{ - "parser": "@typescript-eslint/parser", - "plugins": ["@eslint-react/eslint-plugin"], - "extends": ["eslint:recommended"], - "overrides": [ - { - "files": ["**/*.{ts,tsx}"], - "extends": [ - "plugin:@eslint-react/recommended-legacy" - ] - } - ] -} -``` - [Full Installation Guide ↗](https://eslint-react.xyz/docs/installation)
@@ -141,26 +116,6 @@ Add the plugin to your `.eslintrc.json`: Enable rules that are recommended by ESLint React with additional rules that require type information.\ _This preset includes the `recommended` preset._ -### Legacy Config - -
-Click to toggle contents - -- **core-legacy**\ - Enable rules that are renderer-agnostic. -- **dom-legacy**\ - Enable rules that are specific to React DOM. -- **web-api-legacy**\ - Enable rules for interacting with Web APIs. -- **recommended-legacy**\ - Enable rules that are recommended by ESLint React.\ - _This preset includes the `core-legacy`, `dom-legacy`, and `web-api-legacy` presets._ -- **recommended-type-checked-legacy**\ - Enable rules that are recommended by ESLint React with additional rules that require type information.\ - _This preset includes the `recommended-legacy` preset._ - -
- [Full Presets List↗](https://eslint-react.xyz/docs/presets) ## Rules diff --git a/packages/plugins/eslint-plugin-react-debug/README.md b/packages/plugins/eslint-plugin-react-debug/README.md index fa8a576cd..e21ae733b 100644 --- a/packages/plugins/eslint-plugin-react-debug/README.md +++ b/packages/plugins/eslint-plugin-react-debug/README.md @@ -14,8 +14,6 @@ npm install --save-dev eslint-plugin-react-dom ## Setup -Add the plugin to your `eslint.config.js`: - ```js // @ts-check diff --git a/packages/plugins/eslint-plugin-react-dom/README.md b/packages/plugins/eslint-plugin-react-dom/README.md index cfeef1332..0e040ff9e 100644 --- a/packages/plugins/eslint-plugin-react-dom/README.md +++ b/packages/plugins/eslint-plugin-react-dom/README.md @@ -14,8 +14,6 @@ npm install --save-dev eslint-plugin-react-dom ## Setup -Add the plugin to your `eslint.config.js`: - ```js // @ts-check diff --git a/packages/plugins/eslint-plugin-react-hooks-extra/README.md b/packages/plugins/eslint-plugin-react-hooks-extra/README.md index fbc070925..24bb27306 100644 --- a/packages/plugins/eslint-plugin-react-hooks-extra/README.md +++ b/packages/plugins/eslint-plugin-react-hooks-extra/README.md @@ -14,8 +14,6 @@ npm install --save-dev eslint-plugin-react-hooks-extra ## Setup -Add the plugin to your `eslint.config.js`: - ```js // @ts-check diff --git a/packages/plugins/eslint-plugin-react-naming-convention/README.md b/packages/plugins/eslint-plugin-react-naming-convention/README.md index 4f47e3693..c2cff8964 100644 --- a/packages/plugins/eslint-plugin-react-naming-convention/README.md +++ b/packages/plugins/eslint-plugin-react-naming-convention/README.md @@ -14,8 +14,6 @@ npm install --save-dev eslint-plugin-react-naming-convention ## Setup -Add the plugin to your `eslint.config.js`: - ```js // @ts-check diff --git a/packages/plugins/eslint-plugin-react-web-api/README.md b/packages/plugins/eslint-plugin-react-web-api/README.md index 1d721ad88..57445e771 100644 --- a/packages/plugins/eslint-plugin-react-web-api/README.md +++ b/packages/plugins/eslint-plugin-react-web-api/README.md @@ -11,8 +11,6 @@ npm install --save-dev eslint-plugin-react-web-api ## Setup -Add the plugin to your `eslint.config.js`: - ```js // @ts-check diff --git a/packages/plugins/eslint-plugin-react-x/README.md b/packages/plugins/eslint-plugin-react-x/README.md index fe144360c..2a8f13068 100644 --- a/packages/plugins/eslint-plugin-react-x/README.md +++ b/packages/plugins/eslint-plugin-react-x/README.md @@ -14,8 +14,6 @@ npm install --save-dev eslint-plugin-react-x ## Setup -Add the plugin to your `eslint.config.js`: - ```js // @ts-check diff --git a/packages/plugins/eslint-plugin/README.md b/packages/plugins/eslint-plugin/README.md index cd01ff9f2..216abd2cd 100644 --- a/packages/plugins/eslint-plugin/README.md +++ b/packages/plugins/eslint-plugin/README.md @@ -76,8 +76,6 @@ pnpm add --save-dev @eslint-react/eslint-plugin ### Flat Config -Add the plugin to your `eslint.config.js`: - ```js // @ts-check @@ -97,29 +95,6 @@ export default [ ]; ``` -### Legacy Config - -
-Click to toggle contents - -Add the plugin to your `.eslintrc.json`: - -```json -{ - "parser": "@typescript-eslint/parser", - "plugins": ["@eslint-react/eslint-plugin"], - "extends": ["eslint:recommended"], - "overrides": [ - { - "files": ["**/*.{ts,tsx}"], - "extends": [ - "plugin:@eslint-react/recommended-legacy" - ] - } - ] -} -``` - [Full Installation Guide ↗](https://eslint-react.xyz/docs/installation)
@@ -141,26 +116,6 @@ Add the plugin to your `.eslintrc.json`: Enable rules that are recommended by ESLint React with additional rules that require type information.\ _This preset includes the `recommended` preset._ -### Legacy Config - -
-Click to toggle contents - -- **core-legacy**\ - Enable rules that are renderer-agnostic. -- **dom-legacy**\ - Enable rules that are specific to React DOM. -- **web-api-legacy**\ - Enable rules for interacting with Web APIs. -- **recommended-legacy**\ - Enable rules that are recommended by ESLint React.\ - _This preset includes the `core-legacy`, `dom-legacy`, and `web-api-legacy` presets._ -- **recommended-type-checked-legacy**\ - Enable rules that are recommended by ESLint React with additional rules that require type information.\ - _This preset includes the `recommended-legacy` preset._ - -
- [Full Presets List↗](https://eslint-react.xyz/docs/presets) ## Rules