{"id":25576,"library":"fastlint","title":"fastlint","description":"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.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install fastlint","lang":"bash","label":"npm"},{"cmd":"yarn add fastlint","lang":"bash","label":"yarn"},{"cmd":"pnpm add fastlint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"fastlint is a CLI tool, not a library. Use via npx or global install.","wrong":"require('fastlint')","symbol":"fastlint","correct":"npx fastlint ..."},{"note":"Always invoked from shell, not programmatically.","wrong":"fastlint.start()","symbol":"fastlint binary","correct":"fastlint --version"}],"quickstart":{"code":"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","lang":"javascript","description":"Installs fastlint, creates a git repo, makes a change, then lints only changed files with eslint."},"warnings":[{"fix":"Use correct letter: Q for untracked, D for deleted.","message":"--diff-filter=Q includes untracked files, not 'Deleted' as some might assume.","severity":"gotcha","affected_versions":"all"},{"fix":"Always specify two branches or use --working-copy explicitly.","message":"Default behavior includes working copy changes if no branch arguments given; may surprise users expecting empty output.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'origin/main' or 'master' if local branch exists.","cause":"Typo or remote not fetched; branch name incorrect.","error":"fastlint: 'origin/master' is not a valid git reference"},{"fix":"Use correct form: fastlint <since> <until>, e.g. 'HEAD~5 HEAD'.","cause":"Missing space between revisions and paths, or incorrect syntax.","error":"fatal: ambiguous argument 'HEAD~5 HEAD': unknown revision or path"},{"fix":"Place --print0 at end of options before xargs.","cause":"Using --print0 as a boolean flag; it's fine, but if followed by argument, fails.","error":"fastlint: option '--print0' requires a value"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}