fix: add prefer-dom-node-dataset rule (#5107)

This commit is contained in:
LongYinan
2023-11-29 04:43:35 +00:00
parent 923844f302
commit 123f091e5b
9 changed files with 13 additions and 22 deletions
+2
View File
@@ -48,6 +48,8 @@ export const getPagesCount = async (page: Page) => {
return 0;
}
// locator is not a HTMLElement, so we can't use dataset
// eslint-disable-next-line unicorn/prefer-dom-node-dataset
const count = await locator.getAttribute('data-total-count');
return count ? parseInt(count) : 0;
};