Registry / devops / eslint-gitignore

eslint-gitignore

JSON →
library0.1.0jsnpmunverified

eslint-gitignore is a utility package designed to integrate patterns from `.gitignore` files directly into an ESLint configuration's `ignorePatterns` array. It was last published six years ago, with its sole version being `0.1.0`. The package appears to be abandoned, with no further updates or maintenance since its initial release. While it served a specific purpose at the time of its creation by programmatically parsing gitignore files, modern ESLint versions, particularly with the introduction of flat configurations, now offer native capabilities to achieve this through the `@eslint/compat` package's `includeIgnoreFile` utility. Therefore, its key differentiator has been superseded by core ESLint functionality, making it largely obsolete for new projects and potentially problematic for existing ones due to lack of maintenance.

devops
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This package is CommonJS-only, last published over 6 years ago. ESM imports are not supported.

const { readGitignoreFiles } = require('eslint-gitignore')

The primary use case is within an `.eslintrc.js` file to populate the `ignorePatterns` array.

module.exports = { ignorePatterns: readGitignoreFiles({ cwd: __dirname }) }

Demonstrates how to integrate `readGitignoreFiles` into an ESLint CommonJS configuration file to respect `.gitignore` patterns.

const { readGitignoreFiles } = require('eslint-gitignore'); module.exports = { root: true, env: { browser: true, es2021: true, node: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended' ], parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, plugins: [ 'react', '@typescript-eslint' ], rules: { // Example rule 'no-unused-vars': 'warn' }, // Uses eslint-gitignore to incorporate .gitignore patterns ignorePatterns: readGitignoreFiles({ cwd: __dirname }) }; // To run ESLint: npx eslint .
Debug
Known footguns
breakingThis package is effectively abandoned, with no updates or maintenance for over 6 years. It is highly unlikely to be compatible with modern ESLint versions (e.g., v8, v9 with flat config) or newer Node.js runtimes without potential issues.
gotchaThe functionality provided by `eslint-gitignore` is now natively supported and recommended directly within ESLint (especially with flat configurations using `@eslint/compat`). Relying on this abandoned package introduces unnecessary technical debt and potential compatibility problems.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources