Skip to content

Commit a63f6d1

Browse files
docs: cleanup migration guide docs (#470)
1 parent fd5f057 commit a63f6d1

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ $ yarn add --dev eslint-plugin-testing-library
4545

4646
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-testing-library` globally.
4747

48-
## Migrating to v4
48+
## Migrating
4949

50-
You can find [here a detailed guide for migrating `eslint-plugin-testing-library` to v4](docs/migrating-to-v4-guide.md).
50+
You can find detailed guides for migrating `eslint-plugin-testing-library` in the [migration guide docs](docs/migration-guides):
51+
52+
- [Migrate guide for v4](docs/migration-guides/v4.md)
5153

5254
## Usage
5355

@@ -217,19 +219,19 @@ To enable this configuration use the `extends` property in your
217219

218220
## Aggressive Reporting
219221

220-
In v4 this plugin introduced a new feature called "Aggressive Reporting", which intends to detect Testing Library utils usages even if they don't come directly from a Testing Library package (i.e. [using a custom utility file to re-export everything from Testing Library](https://testing-library.com/docs/react-testing-library/setup/#custom-render)). You can [read more about this feature here](docs/migrating-to-v4-guide.md#aggressive-reporting).
222+
In v4 this plugin introduced a new feature called "Aggressive Reporting", which intends to detect Testing Library utils usages even if they don't come directly from a Testing Library package (i.e. [using a custom utility file to re-export everything from Testing Library](https://testing-library.com/docs/react-testing-library/setup/#custom-render)). You can [read more about this feature here](docs/migration-guides/v4.md#aggressive-reporting).
221223

222224
If you are looking to restricting or switching off this feature, please refer to the [Shared Settings section](#shared-settings) to do so.
223225

224226
## Shared Settings
225227

226-
There are some configuration options available that will be shared across all the plugin rules. This is achieved using [ESLint Shared Settings](https://eslint.org/docs/user-guide/configuring/configuration-files#adding-shared-settings). These Shared Settings are meant to be used if you need to restrict or switch off the Aggressive Reporting, which is an out of the box advanced feature to lint Testing Library usages in a simpler way for most of the users. **So please before configuring any of these settings**, read more about [the advantages of `eslint-plugin-testing-library` Aggressive Reporting feature](docs/migrating-to-v4-guide.md#aggressive-reporting), and [how it's affected by these settings](docs/migrating-to-v4-guide.md#shared-settings).
228+
There are some configuration options available that will be shared across all the plugin rules. This is achieved using [ESLint Shared Settings](https://eslint.org/docs/user-guide/configuring/configuration-files#adding-shared-settings). These Shared Settings are meant to be used if you need to restrict or switch off the Aggressive Reporting, which is an out of the box advanced feature to lint Testing Library usages in a simpler way for most of the users. **So please before configuring any of these settings**, read more about [the advantages of `eslint-plugin-testing-library` Aggressive Reporting feature](docs/migration-guides/v4.md#aggressive-reporting), and [how it's affected by these settings](docs/migration-guides/v4.md#shared-settings).
227229

228230
If you are sure about configuring the settings, these are the options available:
229231

230232
### `testing-library/utils-module`
231233

232-
The name of your custom utility file from where you re-export everything from the Testing Library package, or `"off"` to switch related Aggressive Reporting mechanism off. Relates to [Aggressive Imports Reporting](docs/migrating-to-v4-guide.md#imports).
234+
The name of your custom utility file from where you re-export everything from the Testing Library package, or `"off"` to switch related Aggressive Reporting mechanism off. Relates to [Aggressive Imports Reporting](docs/migration-guides/v4.md#imports).
233235

234236
```json
235237
// .eslintrc
@@ -240,11 +242,11 @@ The name of your custom utility file from where you re-export everything from th
240242
}
241243
```
242244

243-
[You can find more details about the `utils-module` setting here](docs/migrating-to-v4-guide.md#testing-libraryutils-module).
245+
[You can find more details about the `utils-module` setting here](docs/migration-guides/v4.md#testing-libraryutils-module).
244246

245247
### `testing-library/custom-renders`
246248

247-
A list of function names that are valid as Testing Library custom renders, or `"off"` to switch related Aggressive Reporting mechanism off. Relates to [Aggressive Renders Reporting](docs/migrating-to-v4-guide.md#renders).
249+
A list of function names that are valid as Testing Library custom renders, or `"off"` to switch related Aggressive Reporting mechanism off. Relates to [Aggressive Renders Reporting](docs/migration-guides/v4.md#renders).
248250

249251
```json
250252
// .eslintrc
@@ -255,11 +257,11 @@ A list of function names that are valid as Testing Library custom renders, or `"
255257
}
256258
```
257259

258-
[You can find more details about the `custom-renders` setting here](docs/migrating-to-v4-guide.md#testing-librarycustom-renders).
260+
[You can find more details about the `custom-renders` setting here](docs/migration-guides/v4.md#testing-librarycustom-renders).
259261

260262
### `testing-library/custom-queries`
261263

262-
A list of query names/patterns that are valid as Testing Library custom queries, or `"off"` to switch related Aggressive Reporting mechanism off. Relates to [Aggressive Reporting - Queries](docs/migrating-to-v4-guide.md#queries)
264+
A list of query names/patterns that are valid as Testing Library custom queries, or `"off"` to switch related Aggressive Reporting mechanism off. Relates to [Aggressive Reporting - Queries](docs/migration-guides/v4.md#queries)
263265

264266
```json
265267
// .eslintrc
@@ -270,7 +272,7 @@ A list of query names/patterns that are valid as Testing Library custom queries,
270272
}
271273
```
272274

273-
[You can find more details about the `custom-queries` setting here](docs/migrating-to-v4-guide.md#testing-librarycustom-queries).
275+
[You can find more details about the `custom-queries` setting here](docs/migration-guides/v4.md#testing-librarycustom-queries).
274276

275277
### Switching all Aggressive Reporting mechanisms off
276278

File renamed without changes.

0 commit comments

Comments
 (0)