chore: tighten biome rules further

This commit is contained in:
Peter Steinberger
2025-12-31 19:52:23 +01:00
parent 354bf11471
commit 94de794588
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
### Changed ### Changed
- Cookie extraction now uses `@steipete/sweet-cookie` (drops `sqlite3` CLI + custom browser readers in `bird`). - Cookie extraction now uses `@steipete/sweet-cookie` (drops `sqlite3` CLI + custom browser readers in `bird`).
- Query ID updater now tracks the Bookmarks GraphQL operation. - Query ID updater now tracks the Bookmarks GraphQL operation.
- Lint rules stricter (block statements, top-level regex, import extension enforcement). - Lint rules stricter (block statements, no-negation-else, useConst/useTemplate, top-level regex, import extension enforcement).
### Tests ### Tests
- Coverage thresholds raised to 90% statements/lines/functions (80% branches). - Coverage thresholds raised to 90% statements/lines/functions (80% branches).
+4 -1
View File
@@ -25,8 +25,11 @@
"useTopLevelRegex": "error" "useTopLevelRegex": "error"
}, },
"style": { "style": {
"noNegationElse": "error",
"noNonNullAssertion": "error", "noNonNullAssertion": "error",
"useBlockStatements": "error" "useBlockStatements": "error",
"useConst": "error",
"useTemplate": "error"
}, },
"suspicious": { "suspicious": {
"noExplicitAny": "error" "noExplicitAny": "error"
+3 -3
View File
@@ -688,13 +688,13 @@ program
if (!query) { if (!query) {
const who = await client.getCurrentUser(); const who = await client.getCurrentUser();
const handle = normalizeHandle(who.user?.username); const handle = normalizeHandle(who.user?.username);
if (!handle) { if (handle) {
query = `@${handle}`;
} else {
console.error( console.error(
`${p('err')}Could not determine current user (${who.error ?? 'Unknown error'}). Use --user <handle>.`, `${p('err')}Could not determine current user (${who.error ?? 'Unknown error'}). Use --user <handle>.`,
); );
process.exit(1); process.exit(1);
} else {
query = `@${handle}`;
} }
} }