Skip to content

Commit 1408b3d

Browse files
committed
docs: initial v6 migration guide
1 parent e394ce0 commit 1408b3d

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ $ yarn add --dev eslint-plugin-testing-library
4949

5050
You can find detailed guides for migrating `eslint-plugin-testing-library` in the [migration guide docs](docs/migration-guides):
5151

52-
- [Migrate guide for v4](docs/migration-guides/v4.md)
53-
- [Migrate guide for v5](docs/migration-guides/v5.md)
52+
- [Migration guide for v4](docs/migration-guides/v4.md)
53+
- [Migration guide for v5](docs/migration-guides/v5.md)
54+
- [Migration guide for v6](docs/migration-guides/v6.md)
5455

5556
## Usage
5657

docs/migration-guides/v6.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Guide: migrating to v6
2+
3+
If you are not on v5 yet, we recommend first following the [v5 migration guide](docs/migration-guides/v5.md).
4+
5+
## Overview
6+
7+
- `prefer-wait-for` was removed
8+
- `await-fire-event` is now called `await-async-event` with support for an `eventModule` option with `userEvent` and/or `fireEvent`
9+
- `await-async-event` is now enabled by default for `fireEvent` in Vue and Marko shared configs
10+
- `await-async-event` is now enabled by default for `userEvent` in React, Angular, and DOM shared configs
11+
- `no-render-in-setup` is now called `no-render-in-lifecycle`
12+
- `no-manual-cleanup` is now enabled by default in React and Vue shared configs
13+
- `no-global-regexp-flag-in-query` is now enabled by default in all shared configs
14+
- `no-node-access` is now enabled by default in DOM shared config
15+
- `no-debugging-utils` now reports all debugging utility methods by default
16+
- `no-debugging-utils` now defaults to `warn` instead of `error` in all shared configs
17+
18+
## Steps to upgrade
19+
20+
- Removing `testing-library/prefer-wait-for` if you were referencing it manually somewhere
21+
- Renaming `testing-library/await-fire-event` to `testing-library/await-async-event` if you were referencing it manually somewhere
22+
- Renaming `testing-library/no-render-in-setup` to `testing-library/no-render-in-lifecycle` if you were referencing it manually somewhere
23+
- Being aware of new rules enabled or changed above in shared configs which can lead to newly reported errors

0 commit comments

Comments
 (0)