{"id":24939,"library":"auto-git-lint","title":"auto-git-lint","description":"A global or project-level CLI tool that automatically runs ESLint and Prettier linting on staged files before Git commits. Version 1.0.12 is current but appears infrequently updated. It simplifies setup by providing a single 'auto-lint' command, wrapping common ESLint (including @typescript-eslint parser/plugin) and Prettier configurations. It aims to replace manual husky/lint-staged setups but offers limited customization and documentation.","status":"active","version":"1.0.12","language":"javascript","source_language":"en","source_url":"https://github.com/wuyonggang100/auto-lint","tags":["javascript","auto","lint","husky"],"install":[{"cmd":"npm install auto-git-lint","lang":"bash","label":"npm"},{"cmd":"yarn add auto-git-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add auto-git-lint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package exposes a CLI command 'auto-lint', not a JavaScript import. Use 'npx auto-lint' or install globally.","wrong":"auto-git-lint","symbol":"CLI","correct":"npx auto-lint"},{"note":"The package is primarily a CLI tool and may not export a default JS function. Check documentation before importing programmatically.","wrong":"const autoGitLint = require('auto-git-lint')","symbol":"default","correct":"import autoGitLint from 'auto-git-lint'"},{"note":"If exported, it's likely a named export. Verify actual exports.","wrong":"import autoLint from 'auto-git-lint'","symbol":"autoLint","correct":"import { autoLint } from 'auto-git-lint'"}],"quickstart":{"code":"# Install globally\nnpm install -g auto-git-lint\n# Or in project\nnpm install --save-dev auto-git-lint\n\n# Run lint on staged files using git diff\ncd your-project\nauto-lint\n","lang":"javascript","description":"Installs the tool globally or as a dev dependency, then runs 'auto-lint' in a project to lint staged files."},"warnings":[{"fix":"Ensure you have staged changes before running 'auto-lint'.","message":"auto-lint command only works with staged files via git diff; it does not lint entire project.","severity":"gotcha","affected_versions":">=0.0"},{"fix":"Use project-local installation and manage dependencies manually.","message":"The package may automatically install ESLint and Prettier dependencies globally. This can lead to version conflicts with existing project setups.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider alternatives like husky + lint-staged or lefthook.","message":"The package appears unmaintained since 2022. No support for newer ESLint flat config or Prettier v3.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install globally: npm install -g auto-git-lint. Or use npx: npx auto-lint.","cause":"Package not installed globally or not in PATH.","error":"auto-lint: command not found"},{"fix":"Uninstall global auto-git-lint and install locally. Manually set up ESLint and Prettier.","cause":"Auto-installed dependency conflict.","error":"ESLint version mismatch: auto-git-lint requires ESLint ^7.0.0 but project uses ^8.0.0"},{"fix":"Stage files: git add <file> or git add -A; then run auto-lint.","cause":"No files staged via git add.","error":"Error: No staged files found. Please stage your changes first."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}