Skip to content

Commit

Permalink
Merge branch 'main' into pr/await-async-events-rule-validates-usereve…
Browse files Browse the repository at this point in the history
…nt-session
  • Loading branch information
Belco90 authored Nov 9, 2023
2 parents 8ba464f + 05e94fa commit 8f1e313
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 88 deletions.
20 changes: 20 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,26 @@
"test",
"doc"
]
},
{
"login": "maisano",
"name": "Richard Maisano",
"avatar_url": "https://avatars.githubusercontent.com/u/689081?v=4",
"profile": "https://github.com/maisano",
"contributions": [
"code",
"test"
]
},
{
"login": "doochik",
"name": "Aleksei Androsov",
"avatar_url": "https://avatars.githubusercontent.com/u/31961?v=4",
"profile": "https://github.com/doochik",
"contributions": [
"code",
"test"
]
}
],
"contributorsPerLine": 7,
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: actions/checkout@v4

- name: Use Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
uses: actions/checkout@v4

- name: Use Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
uses: actions/checkout@v4

- name: Use Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Use Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nathanmmiller"><img src="https://avatars.githubusercontent.com/u/37555055?v=4?s=100" width="100px;" alt="Nathan"/><br /><sub><b>Nathan</b></sub></a><br /><a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=nathanmmiller" title="Code">💻</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=nathanmmiller" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/justintoman"><img src="https://avatars.githubusercontent.com/u/11649507?v=4?s=100" width="100px;" alt="justintoman"/><br /><sub><b>justintoman</b></sub></a><br /><a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=justintoman" title="Code">💻</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=justintoman" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/adevick"><img src="https://avatars.githubusercontent.com/u/106642175?v=4?s=100" width="100px;" alt="Anthony Devick"/><br /><sub><b>Anthony Devick</b></sub></a><br /><a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=adevick" title="Code">💻</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=adevick" title="Tests">⚠️</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=adevick" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/maisano"><img src="https://avatars.githubusercontent.com/u/689081?v=4?s=100" width="100px;" alt="Richard Maisano"/><br /><sub><b>Richard Maisano</b></sub></a><br /><a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=maisano" title="Code">💻</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=maisano" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/doochik"><img src="https://avatars.githubusercontent.com/u/31961?v=4?s=100" width="100px;" alt="Aleksei Androsov"/><br /><sub><b>Aleksei Androsov</b></sub></a><br /><a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=doochik" title="Code">💻</a> <a href="https://github.com/testing-library/eslint-plugin-testing-library/commits?author=doochik" title="Tests">⚠️</a></td>
</tr>
</tbody>
</table>
Expand Down
11 changes: 4 additions & 7 deletions lib/rules/no-manual-cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,12 @@ export default createTestingLibraryRule<Options, MessageIds>({
return {
'Program:exit'() {
const testingLibraryImportName = helpers.getTestingLibraryImportName();
const testingLibraryImportNode = helpers.getTestingLibraryImportNode();
const customModuleImportNode = helpers.getCustomModuleImportNode();

if (
testingLibraryImportName &&
testingLibraryImportNode &&
testingLibraryImportName.match(CLEANUP_LIBRARY_REGEXP)
) {
reportCandidateModule(testingLibraryImportNode);
if (testingLibraryImportName?.match(CLEANUP_LIBRARY_REGEXP)) {
for (const importNode of helpers.getAllTestingLibraryImportNodes()) {
reportCandidateModule(importNode);
}
}

if (customModuleImportNode) {
Expand Down
157 changes: 80 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8f1e313

Please sign in to comment.