Skip to content

Commit 94163c1

Browse files
committed
Fix lint
1 parent 8ae5a9c commit 94163c1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"@typescript-eslint/prefer-optional-chain": "off",
9191
"@typescript-eslint/no-explicit-any": "off",
9292
"@typescript-eslint/no-unsafe-member-access": "off",
93+
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
9394
"@typescript-eslint/prefer-includes": "off",
9495
"import/prefer-default-export": "off",
9596
"import/no-unassigned-import": "off",

src/queries/role.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ const queryAllByRole: AllByRole = (
124124
}
125125
}
126126

127-
const subtreeIsInaccessibleCache = new WeakMap<HTMLElement, Boolean>()
128-
function cachedIsSubtreeInaccessible(element: HTMLElement): Boolean {
127+
const subtreeIsInaccessibleCache = new WeakMap<Element, Boolean>()
128+
function cachedIsSubtreeInaccessible(element: Element) {
129129
if (!subtreeIsInaccessibleCache.has(element)) {
130130
subtreeIsInaccessibleCache.set(element, isSubtreeInaccessible(element))
131131
}
132132

133-
return subtreeIsInaccessibleCache.get(element) as Boolean
133+
return subtreeIsInaccessibleCache.get(element) as boolean
134134
}
135135

136136
return Array.from(
@@ -222,7 +222,7 @@ const queryAllByRole: AllByRole = (
222222
.filter(element => {
223223
return hidden === false
224224
? isInaccessible(element, {
225-
isSubtreeInaccessible: cachedIsSubtreeInaccessible as any,
225+
isSubtreeInaccessible: cachedIsSubtreeInaccessible,
226226
}) === false
227227
: true
228228
})

0 commit comments

Comments
 (0)