Registry / devops / eslint-formatter-git-log

eslint-formatter-git-log

JSON →
library0.6.4jsnpmunverified

An ESLint formatter that enriches linting results with Git metadata (author, date, hash). Version 0.6.4 is the latest stable release, with maintenance releases as needed. It integrates seamlessly with ESLint's --format flag and supports filtering by committer email, making it ideal for CI and team workflows. Unlike standard formatters, it provides a direct link to the git annotate for each warning or error.

npm install eslint-formatter-git-log
INSTALL
IMPORT
SIG · ESLINT-FORMATTER-G
E
eslint-formatter-git-log
devopsjavascriptv0.6.4
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.

gitLogFormatter
const gitLogFormatter = require('eslint-formatter-git-log');
import gitLogFormatter from 'eslint-formatter-git-log';
ESM import is not supported until a future version; use CommonJS require for now.
withConfig
gitLogFormatter.withConfig({ emailRegExp: /pattern/ })
gitLogFormatter({ emailRegExp: /pattern/ })
withConfig is a method on the default export, not the default itself.
getUserEmail
gitLogFormatter.getUserEmail()
getUserEmail()
getUserEmail is a method on the default export.

Custom ESLint formatter that filters results by committer email regex.

// .eslintrc.js or custom formatter file const gitLogFormatter = require('eslint-formatter-git-log'); module.exports = gitLogFormatter.withConfig({ emailRegExp: /you@example.com/, // optional filter });
Debug
Known issues
gotchaESM imports may not work; must use CommonJS require.
fix
Use require() instead of import.
affects: <=0.6.4
gotchaThe `emailRegExp` filter is case-sensitive if not using the `i` flag.
fix
Include the `i` flag in the regex: /pattern/i
affects: >=0.0.0
deprecatedOlder versions of ESLint (<8) are no longer supported.
fix
Upgrade ESLint to >=8.0.0
affects: <=0.5.0
Errors
Common errors & fixes
TypeError: gitLogFormatter.withConfig is not a function
Using import statement instead of require.
fix
const gitLogFormatter = require('eslint-formatter-git-log');
Cannot find module 'eslint-formatter-git-log'
Missing installation or incorrect require path.
fix
npm install --save-dev eslint eslint-formatter-git-log
Error: Cannot find module 'chalk'
Missing peer dependency chalk (sometimes documented but not listed).
fix
npm install chalk --save-dev
Upgrade
Version history
0.6.4latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required for ESLint formatter integration
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-formatter-git-log — npm install eslint-formatter-git-log · libregistry