From a63f6d10ab453d2534e40bf18e904fdf8c0f1fb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Mon, 6 Sep 2021 17:10:56 +0200 Subject: [PATCH 1/3] docs: cleanup migration guide docs (#470) --- README.md | 22 ++++++++++--------- .../v4.md} | 0 2 files changed, 12 insertions(+), 10 deletions(-) rename docs/{migrating-to-v4-guide.md => migration-guides/v4.md} (100%) diff --git a/README.md b/README.md index 92435bfa..5cf16635 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,11 @@ $ yarn add --dev eslint-plugin-testing-library **Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-testing-library` globally. -## Migrating to v4 +## Migrating -You can find [here a detailed guide for migrating `eslint-plugin-testing-library` to v4](docs/migrating-to-v4-guide.md). +You can find detailed guides for migrating `eslint-plugin-testing-library` in the [migration guide docs](docs/migration-guides): + +- [Migrate guide for v4](docs/migration-guides/v4.md) ## Usage @@ -217,19 +219,19 @@ To enable this configuration use the `extends` property in your ## Aggressive Reporting -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). +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). If you are looking to restricting or switching off this feature, please refer to the [Shared Settings section](#shared-settings) to do so. ## Shared Settings -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). +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). If you are sure about configuring the settings, these are the options available: ### `testing-library/utils-module` -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). +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). ```json // .eslintrc @@ -240,11 +242,11 @@ The name of your custom utility file from where you re-export everything from th } ``` -[You can find more details about the `utils-module` setting here](docs/migrating-to-v4-guide.md#testing-libraryutils-module). +[You can find more details about the `utils-module` setting here](docs/migration-guides/v4.md#testing-libraryutils-module). ### `testing-library/custom-renders` -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). +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). ```json // .eslintrc @@ -255,11 +257,11 @@ A list of function names that are valid as Testing Library custom renders, or `" } ``` -[You can find more details about the `custom-renders` setting here](docs/migrating-to-v4-guide.md#testing-librarycustom-renders). +[You can find more details about the `custom-renders` setting here](docs/migration-guides/v4.md#testing-librarycustom-renders). ### `testing-library/custom-queries` -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) +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) ```json // .eslintrc @@ -270,7 +272,7 @@ A list of query names/patterns that are valid as Testing Library custom queries, } ``` -[You can find more details about the `custom-queries` setting here](docs/migrating-to-v4-guide.md#testing-librarycustom-queries). +[You can find more details about the `custom-queries` setting here](docs/migration-guides/v4.md#testing-librarycustom-queries). ### Switching all Aggressive Reporting mechanisms off diff --git a/docs/migrating-to-v4-guide.md b/docs/migration-guides/v4.md similarity index 100% rename from docs/migrating-to-v4-guide.md rename to docs/migration-guides/v4.md From 08e40fc687ab826795d54af07aa6fb994e5b19e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n=20Alarc=C3=B3n?= Date: Wed, 8 Sep 2021 23:05:47 +0200 Subject: [PATCH 2/3] ci: fix node 16 to 16.8 (#473) --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index dd771bb2..8c67c4d4 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -51,7 +51,7 @@ jobs: strategy: matrix: - node: [10.12, 10, '12.0', 12, 14, 16] + node: [10.12, 10, '12.0', 12, 14, '16.8'] eslint: [7.5, 7] steps: From 0d82ebc175bd1633181ade43bb8d275b1a4682bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 21:07:48 +0000 Subject: [PATCH 3/3] build(deps-dev): bump eslint-plugin-prettier from 3.4.1 to 4.0.0 Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.4.1 to 4.0.0. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/commits/v4.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a59a6b7..bc0caf07 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "eslint-plugin-jest": "^24.4.0", "eslint-plugin-jest-formatting": "^3.0.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-promise": "^5.1.0", "husky": "^7.0.2", "is-ci": "^3.0.0",