Customization

Ignores & Globs

Configure gitignore integration, custom ignore patterns, and built-in glob constants.

@eienjs/eslint-config ignores common build artifacts, lockfiles, and temporary directories out of the box, and integrates directly with your .gitignore.

.gitignore Integration

By default (gitignore: true), @eienjs/eslint-config loads your .gitignore file using eslint-config-flat-gitignore with strict: false.

You can pass custom options to eslint-config-flat-gitignore or disable it entirely:

eslint.config.js
import { eienjs } from '@eienjs/eslint-config';

export default eienjs({
  gitignore: {
    files: ['.gitignore', '.dockerignore'],
    strict: false,
  },
});

Extending Global Ignores

Use the ignores option to add project-specific ignore patterns on top of the built-in GLOB_EXCLUDE list:

eslint.config.js
import { eienjs } from '@eienjs/eslint-config';

export default eienjs({
  ignores: [
    '**/generated/**',
    '**/fixtures/**',
  ],
});

Modifying Default Ignores

If you need to filter or remove an item from the default ignore list, pass a function to ignores:

eslint.config.js
import { eienjs } from '@eienjs/eslint-config';

export default eienjs({
  ignores: (originals) => originals.filter((glob) => glob !== '**/public'),
});

Built-in Excluded Paths (GLOB_EXCLUDE)

The following paths are ignored by default:

  • Dependencies & Build Outputs: **/node_modules, **/dist, **/build, **/output, **/coverage, **/vendor, **/public
  • Lockfiles: **/package-lock.json, **/yarn.lock, **/pnpm-lock.yaml, **/bun.lockb, **/composer.lock, **/composer.json
  • Framework & Tool Caches: **/.adonisjs, **/.nuxt, **/.next, **/.svelte-kit, **/.vercel, **/.vitepress/cache, **/.output, **/.vite-inspect, **/.cache, **/.temp, **/temp, **/.tmp, **/tmp, **/.history, **/.husky, **/.changeset, **/.idea, **/.yarn, **/.pnpm-store
  • Generated & Test Files: **/CHANGELOG*.md, **/LICENSE*, **/*.min.*, **/__snapshots__, **/tests/_files, **/vite.config.*.timestamp-*, **/auto-import?(s).d.ts, **/auto_import?(s).d.ts, **/components.d.ts, **/typed_router.d.ts
  • AI Assistant Directories: **/.context, **/.claude, **/.agents, **/.agent, **/.*/skills, **/.continue
When typescript is disabled (typescript: false), **/*.?([cm])ts and **/*.?([cm])tsx are also automatically added to global ignores.