Skip to content

Commit

Permalink
feat(no-await-sync-events): add to DOM, Angular & React configs by de…
Browse files Browse the repository at this point in the history
…fault (#667)

BREAKING CHANGE: `no-await-sync-events` is now enabled by default in the DOM, Angular & React configs
  • Loading branch information
MichaelDeBoey committed Oct 5, 2022
1 parent 7ed3da8 commit afce5ea
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -210,7 +210,7 @@ To enable this configuration use the `extends` property in your
| [`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-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-events`](./docs/rules/no-await-sync-events.md) | Disallow unnecessary `await` for sync events | | ![dom-badge][] ![angular-badge][] ![react-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][] |
Expand Down
1 change: 1 addition & 0 deletions lib/configs/angular.ts
Expand Up @@ -11,6 +11,7 @@ export = {
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-events': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
'testing-library/no-debugging-utils': 'warn',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/dom.ts
Expand Up @@ -11,6 +11,7 @@ export = {
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-events': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-global-regexp-flag-in-query': 'error',
'testing-library/no-node-access': 'error',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/react.ts
Expand Up @@ -11,6 +11,7 @@ export = {
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-events': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
'testing-library/no-debugging-utils': 'warn',
Expand Down
6 changes: 3 additions & 3 deletions lib/rules/no-await-sync-events.ts
Expand Up @@ -25,9 +25,9 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description: 'Disallow unnecessary `await` for sync events',
recommendedConfig: {
dom: false,
angular: false,
react: false,
dom: 'error',
angular: 'error',
react: 'error',
vue: false,
marko: false,
},
Expand Down
3 changes: 3 additions & 0 deletions tests/__snapshots__/index.test.ts.snap
Expand Up @@ -15,6 +15,7 @@ Object {
],
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-container": "error",
"testing-library/no-debugging-utils": "warn",
Expand Down Expand Up @@ -50,6 +51,7 @@ Object {
],
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-global-regexp-flag-in-query": "error",
"testing-library/no-node-access": "error",
Expand Down Expand Up @@ -116,6 +118,7 @@ Object {
],
"testing-library/await-async-query": "error",
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-events": "error",
"testing-library/no-await-sync-queries": "error",
"testing-library/no-container": "error",
"testing-library/no-debugging-utils": "warn",
Expand Down

0 comments on commit afce5ea

Please sign in to comment.