Skip to content

Commit

Permalink
docs: add migration guide to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
Belco90 committed Oct 17, 2021
1 parent 307bfac commit 6dd5158
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -50,6 +50,7 @@ $ yarn add --dev eslint-plugin-testing-library
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)
- [Migrate guide for v5](docs/migration-guides/v5.md)

## Usage

Expand Down
25 changes: 25 additions & 0 deletions docs/migration-guides/v5.md
@@ -0,0 +1,25 @@
# Guide: migrating to v5

Assuming you are already in v4, migrating to v5 will be easy. If you are not in v4 yet, we recommend you to follow [the proper guide to migrate to it](docs/migration-guides/v4.md).

## Overview

- Support for ESLint v8
- Drop support for Node v10 - required node version is now `^12.22.0 || ^14.17.0 || >=16.0.0`. Node v10 was EOL'd in April 2021, and ESLint v8 dropped support for it too.
- Update dependencies
- `no-debug` is now called `no-debugging-utils`
- `no-render-in-setup` is now enabled by default in the Angular, React & Vue configs
- `no-unnecessary-act`'s `isStrict` option is now `true` by default
- `no-unnecessary-act` is now enabled by default in the React config
- `no-wait-for-multiple-assertions` is now enabled by default in all configs
- `no-wait-for-side-effects` is now enabled by default in all configs
- `no-wait-for-snapshot` is now enabled by default in all configs
- `prefer-presence-queries` is now enabled by default in all configs
- `prefer-query-by-disappearance` is now enabled by default in all configs

## Steps to upgrade

- `eslint-plugin-testing-library` supports both ESLint v7 and v8, so you are fine with either version
- Make sure you are using a compatible Node version, and update it if it's not the case
- Rename `testing-library/no-debug` to `testing-library/no-debugging-utils` if you were referencing it manually somewhere
- Be aware of new rules enabled in Shared Configs which can lead to new reported errors

0 comments on commit 6dd5158

Please sign in to comment.