Skip to content

Commit

Permalink
feat(no-node-access): add to DOM config by default (#661)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `no-node-access` is now enabled by default in the DOM config
  • Loading branch information
skovy authored and MichaelDeBoey committed Oct 4, 2022
1 parent b4b5394 commit 8dfe155
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -217,7 +217,7 @@ To enable this configuration use the `extends` property in your
| [`no-dom-import`](./docs/rules/no-dom-import.md) | Disallow importing from DOM Testing Library | 🔧 | ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-global-regexp-flag-in-query`](./docs/rules/no-global-regexp-flag-in-query.md) | Disallow the use of the global RegExp flag (/g) in queries | 🔧 | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-manual-cleanup`](./docs/rules/no-manual-cleanup.md) | Disallow the use of `cleanup` | | ![react-badge][] ![vue-badge][] |
| [`no-node-access`](./docs/rules/no-node-access.md) | Disallow direct Node access | | ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-node-access`](./docs/rules/no-node-access.md) | Disallow direct Node access | | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-promise-in-fire-event`](./docs/rules/no-promise-in-fire-event.md) | Disallow the use of promises passed to a `fireEvent` method | | ![dom-badge][] ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-render-in-lifecycle`](./docs/rules/no-render-in-lifecycle.md) | Disallow the use of `render` in testing frameworks setup functions | | ![angular-badge][] ![react-badge][] ![vue-badge][] ![marko-badge][] |
| [`no-unnecessary-act`](./docs/rules/no-unnecessary-act.md) | Disallow wrapping Testing Library utils or empty callbacks in `act` | | ![react-badge][] ![marko-badge][] |
Expand Down
1 change: 1 addition & 0 deletions lib/configs/dom.ts
Expand Up @@ -13,6 +13,7 @@ export = {
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-query': 'error',
'testing-library/no-global-regexp-flag-in-query': 'error',
'testing-library/no-node-access': 'error',
'testing-library/no-promise-in-fire-event': 'error',
'testing-library/no-wait-for-empty-callback': 'error',
'testing-library/no-wait-for-multiple-assertions': 'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-node-access.ts
Expand Up @@ -14,7 +14,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
docs: {
description: 'Disallow direct Node access',
recommendedConfig: {
dom: false,
dom: 'error',
angular: 'error',
react: 'error',
vue: 'error',
Expand Down
1 change: 1 addition & 0 deletions tests/__snapshots__/index.test.ts.snap
Expand Up @@ -52,6 +52,7 @@ Object {
"testing-library/await-async-utils": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-global-regexp-flag-in-query": "error",
"testing-library/no-node-access": "error",
"testing-library/no-promise-in-fire-event": "error",
"testing-library/no-wait-for-empty-callback": "error",
"testing-library/no-wait-for-multiple-assertions": "error",
Expand Down

0 comments on commit 8dfe155

Please sign in to comment.