Skip to content

feat(lint): make --fix actually fix things#57

Draft
natemoo-re wants to merge 3 commits into
mainfrom
feat/lint-fix-pipeline
Draft

feat(lint): make --fix actually fix things#57
natemoo-re wants to merge 3 commits into
mainfrom
feat/lint-fix-pipeline

Conversation

@natemoo-re

Copy link
Copy Markdown
Member

Summary

--fix previously only ran oxlint --fix, so agents hand-fixed everything else — burning tokens on deterministic work. This chains in the fixers the toolchain already has, plus one new custom rule.

  • knip fixes: --fix now removes unused dependencies/devDependencies from package.json via knip --fix --fix-type dependencies. With --fix --strict, dead-code fix types (exports, types) are included. Unused files are never deleted automatically.
  • bombshell-dev/no-console-log replaces the stock no-console rule: console.log is auto-fixed to console.info — semantically neutral in Node, where the two are aliases for the same stdout write. (326 hits in the session logs; previously every one was a manual edit.) Other unlisted console methods are flagged but not fixed.

Verified end-to-end: running bsh lint --fix on this repo fixed 20 console.log sites across 5 files (committed separately as dogfooding).

Sharp edge (documented in changeset)

knip fixes respect knip config — deps it can't trace (e.g. binaries referenced via node_modules/.bin paths, as this repo does in utils.ts) look unused and will be removed. On main's config, knip --fix stripped oxlint/oxfmt/@typescript/native-preview from this repo's own package.json (caught and reverted here). #56 fixes this repo's config — the package.json#knip key with the ignore list was being silently ignored in favor of knip.jsonc. That PR should land before or with this one.

Notes

Includes changeset (minor).

- oxlint --fix now chains into knip --fix: unused dependencies are
  removed from package.json (dead-code fix types require --strict;
  files are never deleted automatically)
- new bombshell-dev/no-console-log rule replaces stock no-console:
  flags console.log with an auto-fixer to console.info (semantically
  neutral in Node — they are the same stdout write)
console.log → console.info across the CLI, applied by the new fixer.
@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4a2cfa6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bomb.sh/tools Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@bomb.sh/tools@57

commit: 4a2cfa6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant