Skip to content
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

feat(no-await-sync-query): rename to no-await-sync-queries #666

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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Then configure the rules you want to use within `rules` property of your `.eslin
{
"rules": {
"testing-library/await-async-query": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": "off"
}
Expand Down Expand Up @@ -211,7 +211,7 @@ To enable this configuration use the `extends` property in your
| [`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 | | |
| [`no-await-sync-query`](./docs/rules/no-await-sync-query.md) | Disallow unnecessary `await` for sync queries | | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-await-sync-queries`](./docs/rules/no-await-sync-queries.md) | Disallow unnecessary `await` for sync queries | | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-container`](./docs/rules/no-container.md) | Disallow the use of `container` methods | | ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-debugging-utils`](./docs/rules/no-debugging-utils.md) | Disallow the use of debugging utilities like `debug` | | ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-dom-import`](./docs/rules/no-dom-import.md) | Disallow importing from DOM Testing Library | 🔧 | ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disallow unnecessary `await` for sync queries (`testing-library/no-await-sync-query`)
# Disallow unnecessary `await` for sync queries (`testing-library/no-await-sync-queries`)

Ensure that sync queries are not awaited unnecessarily.

Expand Down
2 changes: 1 addition & 1 deletion lib/configs/angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export = {
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-query': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
'testing-library/no-debugging-utils': 'warn',
'testing-library/no-dom-import': ['error', 'angular'],
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export = {
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-query': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-global-regexp-flag-in-query': 'error',
'testing-library/no-node-access': 'error',
'testing-library/no-promise-in-fire-event': '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 @@ -11,7 +11,7 @@ export = {
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-query': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
'testing-library/no-debugging-utils': 'warn',
'testing-library/no-dom-import': ['error', 'marko'],
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export = {
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-query': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
'testing-library/no-debugging-utils': 'warn',
'testing-library/no-dom-import': ['error', 'react'],
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export = {
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-query': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
'testing-library/no-debugging-utils': 'warn',
'testing-library/no-dom-import': ['error', 'vue'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TSESTree } from '@typescript-eslint/utils';
import { createTestingLibraryRule } from '../create-testing-library-rule';
import { getDeepestIdentifierNode } from '../node-utils';

export const RULE_NAME = 'no-await-sync-query';
export const RULE_NAME = 'no-await-sync-queries';
export type MessageIds = 'noAwaitSyncQuery';
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 @@ -15,7 +15,7 @@ Object {
],
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-container": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": Array [
Expand Down Expand Up @@ -50,7 +50,7 @@ Object {
],
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-global-regexp-flag-in-query": "error",
"testing-library/no-node-access": "error",
"testing-library/no-promise-in-fire-event": "error",
Expand Down Expand Up @@ -80,7 +80,7 @@ Object {
],
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-container": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": Array [
Expand Down Expand Up @@ -116,7 +116,7 @@ Object {
],
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-container": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": Array [
Expand Down Expand Up @@ -156,7 +156,7 @@ Object {
],
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-container": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": Array [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import rule, { RULE_NAME } from '../../../lib/rules/no-await-sync-query';
import rule, { RULE_NAME } from '../../../lib/rules/no-await-sync-queries';
import {
SYNC_QUERIES_COMBINATIONS,
ASYNC_QUERIES_COMBINATIONS,
Expand Down