You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ If you ever need to update a snapshot, you can run `npm run test:update`
44
44
45
45
Based on [ESLint's Rule Naming Conventions](https://eslint.org/docs/developer-guide/working-with-rules#rule-naming-conventions), you must follow these rules:
46
46
47
-
- If your rule is disallowing something, prefix it with `no-` such as `no-debug`
47
+
- If your rule is disallowing something, prefix it with `no-` such as `no-debugging-utils`
48
48
for disallowing `debug()`.
49
49
- If your rule is suggesting to prefer a way of doing something, among other ways, you can **optionally** prefix it with
50
50
`prefer-`. For example, `prefer-screen-queries` suggests to use `screen.getByText()` from imported `screen` rather
@@ -57,11 +57,11 @@ Based on [ESLint's Rule Naming Conventions](https://eslint.org/docs/developer-gu
57
57
## Adding new rules
58
58
59
59
In the [same way as ESLint](https://eslint.org/docs/developer-guide/working-with-rules),
60
-
each rule has three files named with its identifier (e.g. `no-debug`):
60
+
each rule has three files named with its identifier (e.g. `no-debugging-utils`):
61
61
62
-
- in the `lib/rules` directory: a source file (e.g. `no-debug.ts`)
63
-
- in the `tests/lib/rules` directory: a test file (e.g. `no-debug.ts`)
64
-
- in the `docs/rules` directory: a Markdown documentation file (e.g. `no-debug.md`)
62
+
- in the `lib/rules` directory: a source file (e.g. `no-debugging-utils.ts`)
63
+
- in the `tests/lib/rules` directory: a test file (e.g. `no-debugging-utils.ts`)
64
+
- in the `docs/rules` directory: a Markdown documentation file (e.g. `no-debugging-utils.md`)
65
65
66
66
Additionally, you need to do a couple of extra things:
Copy file name to clipboardExpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ Then configure the rules you want to use within `rules` property of your `.eslin
68
68
"rules": {
69
69
"testing-library/await-async-query": "error",
70
70
"testing-library/no-await-sync-query": "error",
71
-
"testing-library/no-debug": "warn",
71
+
"testing-library/no-debugging-utils": "warn",
72
72
"testing-library/no-dom-import": "off"
73
73
}
74
74
}
@@ -195,7 +195,7 @@ To enable this configuration use the `extends` property in your
195
195
|[`testing-library/no-await-sync-events`](./docs/rules/no-await-sync-events.md)| Disallow unnecessary `await` for sync events |||
196
196
|[`testing-library/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][]|
197
197
|[`testing-library/no-container`](./docs/rules/no-container.md)| Disallow the use of `container` methods ||![angular-badge][]![react-badge][]![vue-badge][]|
198
-
|[`testing-library/no-debug`](./docs/rules/no-debug.md)| Disallow the use of debugging utilities like `debug`||![angular-badge][]![react-badge][]![vue-badge][]|
198
+
|[`testing-library/no-debugging-utils`](./docs/rules/no-debugging-utils.md)| Disallow the use of debugging utilities like `debug`||![angular-badge][]![react-badge][]![vue-badge][]|
199
199
|[`testing-library/no-dom-import`](./docs/rules/no-dom-import.md)| Disallow importing from DOM Testing Library | 🔧 |![angular-badge][]![react-badge][]![vue-badge][]|
200
200
|[`testing-library/no-manual-cleanup`](./docs/rules/no-manual-cleanup.md)| Disallow the use of `cleanup`|||
201
201
|[`testing-library/no-node-access`](./docs/rules/no-node-access.md)| Disallow direct Node access ||![angular-badge][]![react-badge][]![vue-badge][]|
Copy file name to clipboardExpand all lines: docs/rules/no-debugging-utils.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Disallow the use of debugging utilities like `debug`(`testing-library/no-debug`)
1
+
# Disallow the use of debugging utilities (`testing-library/no-debugging-utils`)
2
2
3
3
Just like `console.log` statements pollutes the browser's output, debug statements also pollutes the tests if one of your teammates forgot to remove it. `debug` statements should be used when you actually want to debug your tests but should not be pushed to the codebase.
4
4
@@ -41,7 +41,7 @@ You can control which debugging utils are checked for with the `utilsToCheckFor`
0 commit comments