Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions extension/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,6 @@ export default tseslint.config(
// narrowing, while an `if`/`else` trips `prefer-ternary`. Would need a
// disable, so kept as warn; tracked in #279.
"unicorn/prefer-minimal-ternary": "warn",
// prefer-iterator-to-array needs `esnext.iterator` in tsconfig `lib`
// (runtime supports `Iterator#toArray()` at our Chrome 148 / Node 24
// targets, but it isn't typed under the current `ES2023` lib) — tracked
// in #279.
"unicorn/prefer-iterator-to-array": "warn",
"unicorn/no-incorrect-query-selector": "warn",
"unicorn/no-top-level-side-effects": "warn",
// Partially autofixable — fixable instances are corrected in-tree; the
Expand Down
4 changes: 3 additions & 1 deletion extension/src/lib/background/tab-tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ export function createTabTracker(): TabTracker {
return a.ruleId.localeCompare(b.ruleId);
});
const detectionEntries = tabDetections.get(tabId);
const detections = detectionEntries ? [...detectionEntries.values()] : [];
const detections = detectionEntries
? detectionEntries.values().toArray()
: [];
return { entries, detections };
}

Expand Down
2 changes: 1 addition & 1 deletion extension/src/rules/disguised-ad-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ function collectCandidates(root: ParentNode): Candidate[] {
});
}
}
return filterToOutermost([...byArticle.values()], (c) => c.article);
return filterToOutermost(byArticle.values().toArray(), (c) => c.article);
}

function hideCandidate(candidate: Candidate): void {
Expand Down
2 changes: 1 addition & 1 deletion extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"target": "ES2023",
"module": "ESNext",
"moduleResolution": "bundler",
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"lib": ["ES2023", "ESNext.Iterator", "DOM", "DOM.Iterable"],
"types": ["chrome", "bun"],
"jsx": "react-jsx",
"strict": true,
Expand Down
Loading