Skip to content

Commit

Permalink
chore: delete custom rule to await user event
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrezimmermannbam committed Nov 10, 2023
1 parent 87b004f commit 9b70fe9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { fireEvent, userEvent } from "@testing-library/react-native";

// This should trigger an error breaking eslint-testing-library rule:
// testing-library/no-await-sync-events
// @bam.tech/await-user-event
// @typescript-eslint/no-floating-promises

it("a test", async () => {
await fireEvent();
Expand Down
11 changes: 4 additions & 7 deletions packages/eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,12 @@ This plugin exports some custom rules that you can optionally use in your projec

<!-- begin auto-generated rules list -->

💼 Configurations enabled in.\
🧪 Set in the `tests` configuration.\
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).

| Name | Description | 💼 | 🔧 |
| :------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------- | :-- | :-- |
| [await-user-event](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/await-user-event.md) | Enforces awaiting userEvent calls | 🧪 | 🔧 |
| [prefer-user-event](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/prefer-user-event.md) | Enforces usage of userEvent over fireEvent in tests. | | 🔧 |
| [require-named-effect](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/require-named-effect.md) | Enforces the use of named functions inside a useEffect | | |
| Name | Description | 🔧 |
| :------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------- | :-- |
| [prefer-user-event](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/prefer-user-event.md) | Enforces usage of userEvent over fireEvent in tests. | 🔧 |
| [require-named-effect](https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/docs/rules/require-named-effect.md) | Enforces the use of named functions inside a useEffect | |

<!-- end auto-generated rules list -->

Expand Down
23 changes: 0 additions & 23 deletions packages/eslint-plugin/docs/rules/await-user-event.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/eslint-plugin/lib/configs/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@ module.exports = defineConfig({
"testing-library/prefer-presence-queries": "error",
"testing-library/no-wait-for-side-effects": "error",
"testing-library/prefer-screen-queries": "error",
"@bam.tech/await-user-event": "error",
},
});
49 changes: 0 additions & 49 deletions packages/eslint-plugin/lib/rules/await-user-event.js

This file was deleted.

0 comments on commit 9b70fe9

Please sign in to comment.