Skip to content

docs: initial v6 migration guide #668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ $ 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)
- [Migration guide for v4](docs/migration-guides/v4.md)
- [Migration guide for v5](docs/migration-guides/v5.md)
- [Migration guide for v6](docs/migration-guides/v6.md)

## Usage

Expand Down
28 changes: 28 additions & 0 deletions docs/migration-guides/v6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Guide: migrating to v6

If you are not on v5 yet, we recommend first following the [v5 migration guide](docs/migration-guides/v5.md).

## Overview

- `prefer-wait-for` was removed
- `await-fire-event` is now called `await-async-events` with support for an `eventModule` option with `userEvent` and/or `fireEvent`
- `await-async-events` is now enabled by default for `fireEvent` in Vue and Marko shared configs
- `await-async-events` is now enabled by default for `userEvent` in all shared configs
- `await-async-query` is now called `await-async-queries`
- `no-await-async-query` is now called `no-await-async-queries`
- `no-render-in-setup` is now called `no-render-in-lifecycle`
- `no-await-sync-events` is now enabled by default in React, Angular, and DOM shared configs
- `no-manual-cleanup` is now enabled by default in React and Vue shared configs
- `no-global-regexp-flag-in-query` is now enabled by default in all shared configs
- `no-node-access` is now enabled by default in DOM shared config
- `no-debugging-utils` now reports all debugging utility methods by default
- `no-debugging-utils` now defaults to `warn` instead of `error` in all shared configs

## Steps to upgrade

- Removing `testing-library/prefer-wait-for` if you were referencing it manually somewhere
- Renaming `testing-library/await-fire-event` to `testing-library/await-async-events` if you were referencing it manually somewhere
- Renaming `testing-library/await-async-query` to `testing-library/await-async-queries` if you were referencing it manually somewhere
- Renaming `testing-library/no-await-async-query` to `testing-library/no-await-async-queries` if you were referencing it manually somewhere
- Renaming `testing-library/no-render-in-setup` to `testing-library/no-render-in-lifecycle` if you were referencing it manually somewhere
- Being aware of new rules enabled or changed above in shared configs which can lead to newly reported errors