feat(lint): make --fix actually fix things#57
Draft
natemoo-re wants to merge 3 commits into
Draft
Conversation
- 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 detectedLatest commit: 4a2cfa6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--fixpreviously only ranoxlint --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.--fixnow removes unused dependencies/devDependencies frompackage.jsonviaknip --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-logreplaces the stockno-consolerule:console.logis auto-fixed toconsole.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 --fixon this repo fixed 20console.logsites 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/.binpaths, as this repo does inutils.ts) look unused and will be removed. On main's config,knip --fixstrippedoxlint/oxfmt/@typescript/native-previewfrom this repo's ownpackage.json(caught and reverted here). #56 fixes this repo's config — thepackage.json#knipkey with the ignore list was being silently ignored in favor ofknip.jsonc. That PR should land before or with this one.Notes
fix()fixers withmeta.fixable: 'code'--fixpath inlint.ts) and feat(lint): replace stock max-params with conformance-aware rule #53 (both touchrules/plugin.js/oxlintrc.json) — mechanical to resolveIncludes changeset (minor).