{"id":25868,"library":"lint-filter","title":"lint-filter","description":"A CLI tool that filters lint output (e.g., ESLint checkstyle) to show only errors/warnings on lines changed relative to a git branch (default master). Useful for gradually adopting strict lint rules without breaking existing code. Version 1.7.3 is stable, released 2016-5-17. Supports external formatters, environment variable configuration, and a 'list-files' subcommand for faster linting. Alternative to eslint-nibble or incremental linting approaches.","status":"maintenance","version":"1.7.3","language":"javascript","source_language":"en","source_url":"https://github.com/relekang/lint-filter","tags":["javascript","lint"],"install":[{"cmd":"npm install lint-filter","lang":"bash","label":"npm"},{"cmd":"yarn add lint-filter","lang":"bash","label":"yarn"},{"cmd":"pnpm add lint-filter","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"lint-filter is a CLI tool, not a library. Use npx or global install.","wrong":"import lintFilter from 'lint-filter'","symbol":"lint-filter","correct":"npx lint-filter --help"}],"quickstart":{"code":"npm install --save-dev lint-filter\necho '{\"rules\":{\"no-console\":\"error\"}}' > .eslintrc.json\n# Create a file with lint errors\necho 'console.log(\"hello\");' > test.js\ngit init && git add -A && git commit -m \"init\"\n# Introduce a change\necho 'console.log(\"world\");' >> test.js\n# Run eslint with checkstyle and pipe to lint-filter\neslint . -f checkstyle | npx lint-filter","lang":"javascript","description":"Shows how to install lint-filter, set up a minimal ESlint config, commit code, then see filtered lint output for only new lines."},"warnings":[{"fix":"Upgrade to >=1.6.2 or avoid diff-so-fancy.","message":"diff-so-fancy compatibility: lint-filter may not detect lines correctly if you use diff-so-fancy. Works since v1.6.2.","severity":"gotcha","affected_versions":"<1.6.2"},{"fix":"Use an absolute path or install the module globally.","message":"The 'require:' prefix for external formatters may not work as expected if the module path is relative.","severity":"deprecated","affected_versions":">=1.7.0"},{"fix":"If you need context lines, consider writing a custom script or downgrade.","message":"Only lines that are changed, not context lines, are considered (since v1.6.3). This might miss errors on lines adjacent to changes.","severity":"gotcha","affected_versions":">=1.6.3"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install lint-filter >=1.0.1 or manually install bluebird.","cause":"Missing dependency bluebird (fixed in v1.0.1).","error":"Error: Cannot find module 'bluebird'"},{"fix":"Run 'npx lint-filter' or install globally with 'npm install -g lint-filter'.","cause":"Global install or npx not used.","error":"lint-filter: command not found"},{"fix":"Ensure the file exists or pipe input via stdin.","cause":"File path does not exist.","error":"Error: ENOENT: no such file or directory, open 'path/to/checkstyle-report.xml'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}