Skip to content

Commit 6dd5158

Browse files
committed
docs: add migration guide to v5
1 parent 307bfac commit 6dd5158

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ $ yarn add --dev eslint-plugin-testing-library
5050
You can find detailed guides for migrating `eslint-plugin-testing-library` in the [migration guide docs](docs/migration-guides):
5151

5252
- [Migrate guide for v4](docs/migration-guides/v4.md)
53+
- [Migrate guide for v5](docs/migration-guides/v5.md)
5354

5455
## Usage
5556

docs/migration-guides/v5.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Guide: migrating to v5
2+
3+
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).
4+
5+
## Overview
6+
7+
- Support for ESLint v8
8+
- 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.
9+
- Update dependencies
10+
- `no-debug` is now called `no-debugging-utils`
11+
- `no-render-in-setup` is now enabled by default in the Angular, React & Vue configs
12+
- `no-unnecessary-act`'s `isStrict` option is now `true` by default
13+
- `no-unnecessary-act` is now enabled by default in the React config
14+
- `no-wait-for-multiple-assertions` is now enabled by default in all configs
15+
- `no-wait-for-side-effects` is now enabled by default in all configs
16+
- `no-wait-for-snapshot` is now enabled by default in all configs
17+
- `prefer-presence-queries` is now enabled by default in all configs
18+
- `prefer-query-by-disappearance` is now enabled by default in all configs
19+
20+
## Steps to upgrade
21+
22+
- `eslint-plugin-testing-library` supports both ESLint v7 and v8, so you are fine with either version
23+
- Make sure you are using a compatible Node version, and update it if it's not the case
24+
- Rename `testing-library/no-debug` to `testing-library/no-debugging-utils` if you were referencing it manually somewhere
25+
- Be aware of new rules enabled in Shared Configs which can lead to new reported errors

0 commit comments

Comments
 (0)