Skip to content

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

Merged
natemoo-re merged 4 commits into
mainfrom
feat/lint-fix-pipeline
Jul 26, 2026
Merged

feat(lint): make --fix actually fix things#57
natemoo-re merged 4 commits into
mainfrom
feat/lint-fix-pipeline

Conversation

@natemoo-re

@natemoo-re natemoo-re commented Jul 23, 2026

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: bsh lint --fix on a fixture rewrites console.logconsole.info and empties unused dependencies, leaving "No issues found." This repo's own console sites were fixed the same way (separate commit).

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 the pre-#56 config, knip --fix stripped oxlint/oxfmt/@typescript/native-preview from this repo's own package.json. #56 (merged) fixed that config, so consumers on the new baseline are protected — but any project whose knip config lacks ignores for untraceable deps is exposed. This is knip's config-as-contract model, worth knowing before running --fix in a fresh project.

Notes

Includes changeset (minor).

@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e59f465

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: e59f465

- 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.
Missing brace in printViolations grouping loop, stray rule-object
closers in plugin.js, TS18048 on optional v.line in sort comparator.
@natemoo-re
natemoo-re force-pushed the feat/lint-fix-pipeline branch from 4a2cfa6 to e59f465 Compare July 26, 2026 00:08
@natemoo-re
natemoo-re marked this pull request as ready for review July 26, 2026 00:09
@natemoo-re
natemoo-re merged commit f66e1df into main Jul 26, 2026
4 checks passed
@natemoo-re
natemoo-re deleted the feat/lint-fix-pipeline branch July 26, 2026 00:09
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