Registry / testing / auto-git-lint

auto-git-lint

JSON →
library1.0.12jsnpmunverified

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.

npm install auto-git-lint
INSTALL
IMPORT
SIG · AUTO-GIT-LINT
A
auto-git-lint
testingjavascriptv1.0.12
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.

CLI
npx auto-lint
auto-git-lint
The package exposes a CLI command 'auto-lint', not a JavaScript import. Use 'npx auto-lint' or install globally.
default
import autoGitLint from 'auto-git-lint'
const autoGitLint = require('auto-git-lint')
The package is primarily a CLI tool and may not export a default JS function. Check documentation before importing programmatically.
autoLint
import { autoLint } from 'auto-git-lint'
import autoLint from 'auto-git-lint'
If exported, it's likely a named export. Verify actual exports.

Installs the tool globally or as a dev dependency, then runs 'auto-lint' in a project to lint staged files.

# Install globally npm install -g auto-git-lint # Or in project npm install --save-dev auto-git-lint # Run lint on staged files using git diff cd your-project auto-lint
auto-lint --version
Debug
Known issues
gotchaauto-lint command only works with staged files via git diff; it does not lint entire project.
fix
Ensure you have staged changes before running 'auto-lint'.
affects: >=0.0
gotchaThe package may automatically install ESLint and Prettier dependencies globally. This can lead to version conflicts with existing project setups.
fix
Use project-local installation and manage dependencies manually.
affects: >=1.0.0
deprecatedThe package appears unmaintained since 2022. No support for newer ESLint flat config or Prettier v3.
fix
Consider alternatives like husky + lint-staged or lefthook.
affects: >=1.0.0
Errors
Common errors & fixes
auto-lint: command not found
Package not installed globally or not in PATH.
fix
Install globally: npm install -g auto-git-lint. Or use npx: npx auto-lint.
ESLint version mismatch: auto-git-lint requires ESLint ^7.0.0 but project uses ^8.0.0
Auto-installed dependency conflict.
fix
Uninstall global auto-git-lint and install locally. Manually set up ESLint and Prettier.
Error: No staged files found. Please stage your changes first.
No files staged via git add.
fix
Stage files: git add <file> or git add -A; then run auto-lint.
Upgrade
Version history
1.0.12latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
16
OpenAI (training)
1
Resources
auto-git-lint — npm install auto-git-lint · libregistry