Skip to content

Commit

Permalink
feat(await-async-query): rename to await-async-queries (#665)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `await-async-query` is now called `await-async-queries`
  • Loading branch information
MichaelDeBoey authored Oct 5, 2022
1 parent afce5ea commit c1803df
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Then configure the rules you want to use within `rules` property of your `.eslin
```json
{
"rules": {
"testing-library/await-async-query": "error",
"testing-library/await-async-queries": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": "off"
Expand Down Expand Up @@ -207,7 +207,7 @@ To enable this configuration use the `extends` property in your
| Name | Description | 🔧 | Included in configurations |
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | --- | ---------------------------------------------------------------------------------- |
| [`await-async-event`](./docs/rules/await-async-event.md) | Enforce promises from async event methods are handled | 🔧 | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`await-async-query`](./docs/rules/await-async-query.md) | Enforce promises from async queries to be handled | | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`await-async-queries`](./docs/rules/await-async-queries.md) | Enforce promises from async queries to be handled | | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`await-async-utils`](./docs/rules/await-async-utils.md) | Enforce promises from async utils to be awaited properly | | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`consistent-data-testid`](./docs/rules/consistent-data-testid.md) | Ensures consistent usage of `data-testid` | | |
| [`no-await-sync-events`](./docs/rules/no-await-sync-events.md) | Disallow unnecessary `await` for sync events | | ![dom-badge][] ![angular-badge][] ![react-badge][] |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce promises from async queries to be handled (`testing-library/await-async-query`)
# Enforce promises from async queries to be handled (`testing-library/await-async-queries`)

Ensure that promises returned by async queries are handled properly.

Expand Down
2 changes: 1 addition & 1 deletion lib/configs/angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export = {
'error',
{ eventModule: 'userEvent' },
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-queries': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-events': 'error',
'testing-library/no-await-sync-queries': 'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export = {
'error',
{ eventModule: 'userEvent' },
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-queries': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-events': 'error',
'testing-library/no-await-sync-queries': 'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/marko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export = {
'error',
{ eventModule: ['fireEvent', 'userEvent'] },
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-queries': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export = {
'error',
{ eventModule: 'userEvent' },
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-queries': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-events': 'error',
'testing-library/no-await-sync-queries': 'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export = {
'error',
{ eventModule: ['fireEvent', 'userEvent'] },
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-queries': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
isPromiseHandled,
} from '../node-utils';

export const RULE_NAME = 'await-async-query';
export const RULE_NAME = 'await-async-queries';
export type MessageIds = 'asyncQueryWrapper' | 'awaitAsyncQuery';
type Options = [];

Expand Down
10 changes: 5 additions & 5 deletions tests/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Object {
"eventModule": "userEvent",
},
],
"testing-library/await-async-query": "error",
"testing-library/await-async-queries": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-queries": "error",
Expand Down Expand Up @@ -49,7 +49,7 @@ Object {
"eventModule": "userEvent",
},
],
"testing-library/await-async-query": "error",
"testing-library/await-async-queries": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-queries": "error",
Expand Down Expand Up @@ -80,7 +80,7 @@ Object {
],
},
],
"testing-library/await-async-query": "error",
"testing-library/await-async-queries": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-container": "error",
Expand Down Expand Up @@ -116,7 +116,7 @@ Object {
"eventModule": "userEvent",
},
],
"testing-library/await-async-query": "error",
"testing-library/await-async-queries": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-queries": "error",
Expand Down Expand Up @@ -157,7 +157,7 @@ Object {
],
},
],
"testing-library/await-async-query": "error",
"testing-library/await-async-queries": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-container": "error",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TSESLint } from '@typescript-eslint/utils';

import rule, { RULE_NAME } from '../../../lib/rules/await-async-query';
import rule, { RULE_NAME } from '../../../lib/rules/await-async-queries';
import {
ASYNC_QUERIES_COMBINATIONS,
ASYNC_QUERIES_VARIANTS,
Expand Down

0 comments on commit c1803df

Please sign in to comment.