ReviewOS

also looking at this

craft-native/craft

fix(lint): drop fourteen unused imports that pickier now errors on

#102
Merged glennmichael123 wants to merge fix/lint-unused-imports into main
12 files +10 -12
10 days ago

bunx --bun pickier . resolves the newest pickier at every CI run, and the current release promotes no-unused-imports from a warning to an error. Nothing in the repo changed — the rule did — so lint is now red on every open PR for fourteen unused imports in files nobody touched.

Removed:

fileimport
packages/react/src/hooks/useWindow.tsuseEffect
packages/react/src/hooks/useTray.tsuseEffect
packages/android/src/index.tsreaddirSync
packages/ios/src/index.tsbasename
packages/typescript/src/logging/index.tsjoin
packages/typescript/src/styles/sidebar-templates.tscx
packages/typescript/src/updater/index.tspipeline
packages/typescript/src/utils/svelte.tsreadable, get
packages/typescript/src/signing/index.tsreadFileSync
packages/svelte/src/stores/craft.tsget
examples/voice-buddy.tsjoin
examples/ecommerce-app/src/main.tshttp, secureStorage

Each was verified unused by grepping for the symbol after removal rather than by trusting the rule — packages/react, packages/svelte and examples/ are outside the typecheck script, so the compiler would not have caught a mistake there. The one apparent survivor, pipeline in updater/index.ts, is the word inside a comment.

The cause is worth naming, not just the symptom. The lint script pins no version, so CI and a local checkout run different linters — a local run here reported 0 errors against the installed 0.1.37 while CI failed against 0.1.65. Today that surfaced as a rule getting stricter, which is the benign direction. The same gap would equally let CI run a looser rule set than a developer sees, with nothing to indicate the two ran different code.

Verification

  • bunx --bun pickier@0.1.65 . — 0 errors (32 pre-existing warnings, all markdown/quote style)
  • bun run typecheck — passes

12 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.