Registry / devops / fastlint

fastlint

JSON →
library1.1.0jsnpmunverified

fastlint is a command-line tool (v1.1.0) that speeds up linting by running linters only on files changed in git — either in the working copy, staged, or compared to branches like master. It avoids running on unchanged files, integrating with eslint and other tools via piped filenames. Key features: --staged filter, --diff-filter (A/C/D/M/R/etc.), --glob filtering, and multiple path output modes. Stable, low maintenance, single-purpose tool. Alternatives include lint-staged and husky, but fastlint is more flexible for branch comparison.

npm install fastlint
INSTALL
IMPORT
SIG · FASTLINT
F
fastlint
devopsjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fastlint
npx fastlint ...
require('fastlint')
fastlint is a CLI tool, not a library. Use via npx or global install.
fastlint binary
fastlint --version
fastlint.start()
Always invoked from shell, not programmatically.

Installs fastlint, creates a git repo, makes a change, then lints only changed files with eslint.

npm install -g fastlint && echo "console.log('hello')" > test.js && git init && git add test.js && git commit -m "init" && echo "console.log('world')" >> test.js && fastlint HEAD~1 HEAD --print0 | xargs -0 npx eslint
fastlint --version
Debug
Known issues
gotcha--diff-filter=Q includes untracked files, not 'Deleted' as some might assume.
fix
Use correct letter: Q for untracked, D for deleted.
affects: all
gotchaDefault behavior includes working copy changes if no branch arguments given; may surprise users expecting empty output.
fix
Always specify two branches or use --working-copy explicitly.
affects: all
Errors
Common errors & fixes
fastlint: 'origin/master' is not a valid git reference
Typo or remote not fetched; branch name incorrect.
fix
Use 'origin/main' or 'master' if local branch exists.
fatal: ambiguous argument 'HEAD~5 HEAD': unknown revision or path
Missing space between revisions and paths, or incorrect syntax.
fix
Use correct form: fastlint <since> <until>, e.g. 'HEAD~5 HEAD'.
fastlint: option '--print0' requires a value
Using --print0 as a boolean flag; it's fine, but if followed by argument, fails.
fix
Place --print0 at end of options before xargs.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
fastlint — npm install fastlint · libregistry