{"id":25886,"library":"lint-unpushed","title":"lint-unpushed","description":"Lints or runs tests on only the files that have changed since the last push, using git to detect differences. Version 0.5.2 is the latest stable release. It integrates via git hooks (husky or built-in install script) and replaces #FILES# placeholders with changed file paths. Compared to lint-staged, it triggers on push rather than commit, allowing broader pre-push checks including full project type-checking. Written in JavaScript, ESM-only since v0.4.0, requires Node >= 10. Maintained by Steelbrain; fixes for Windows and stash handling were added in recent versions.","status":"active","version":"0.5.2","language":"javascript","source_language":"en","source_url":"https://github.com/steelbrain/lint-unpushed","tags":["javascript"],"install":[{"cmd":"npm install lint-unpushed","lang":"bash","label":"npm"},{"cmd":"yarn add lint-unpushed","lang":"bash","label":"yarn"},{"cmd":"pnpm add lint-unpushed","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Uses git commands (diff, stash, etc.) to detect unpushed files","package":"git","optional":false}],"imports":[{"note":"Package provides CLI binaries only, no programmatic API. Use npm scripts or direct CLI.","wrong":"require('lint-unpushed')","symbol":"no main module export","correct":"npx lint-unpushed-pre-push"},{"note":"The install binary auto-configures git hooks; avoid manual paths.","wrong":"\"prepare\": \"node node_modules/.bin/lint-unpushed-install\"","symbol":"prepare script binary","correct":"\"prepare\": \"lint-unpushed-install\""}],"quickstart":{"code":"npm install --save-dev lint-unpushed\n# Add to package.json scripts:\n\"prepare\": \"lint-unpushed-install\"\n# Configure in package.json:\n\"lint-unpushed\": {\n  \"**/*.{js,ts}\": \"eslint #FILES#\",\n  \"**/*.{ts,tsx}\": \"tsc -p . --noEmit\"\n}","lang":"javascript","description":"Install and configure lint-unpushed to run ESLint on changed JS/TS files plus full TypeScript check on push."},"warnings":[{"fix":"Update any scripts or hooks that reference `lint-unpushed` to `lint-unpushed-pre-push`.","message":"In v0.5.0 the binary was renamed from `lint-unpushed` to `lint-unpushed-pre-push`.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Update config to Record<string, string|string[]> and include #FILES# where file list is needed.","message":"v0.3.0 changed arguments from array to object, and #FILES# placeholder became required.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Use `\"prepare\": \"lint-unpushed-install\"` instead of Husky.","message":"Husky integration is deprecated in favor of the built-in install script (`lint-unpushed-install`).","severity":"deprecated","affected_versions":">=0.5.0"},{"fix":"Add a post-checkout hook using `lint-unpushed-post-checkout` to create the reference.","message":"If your repository has no remote branch reference (e.g., fresh clone), lint-unpushed may fail to detect changes.","severity":"gotcha","affected_versions":"*"},{"fix":"Upgrade to v0.5.2 or later.","message":"The tool stashes uncommitted changes before running lint; on some platforms (fixed in v0.5.2) the stash might not pop correctly.","severity":"gotcha","affected_versions":">=0.1.0 <0.5.2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use npx lint-unpushed-pre-push or define commands in package.json scripts.","cause":"Trying to require the package as a module, but it only provides CLI binaries.","error":"Error: Cannot find module 'lint-unpushed'"},{"fix":"Run `npm install --save-dev lint-unpushed` and use npx or specify path in scripts.","cause":"Binary not in PATH because package is not installed or not in node_modules/.bin.","error":"sh: lint-unpushed: command not found"},{"fix":"Use `npx lint-unpushed-pre-push` not `git lint-unpushed`.","cause":"Confusing lint-unpushed with git-subcommand style.","error":"git: 'lint-unpushed' is not a git command."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}