Skip to content

chore(lint): source ignores from .gitignore, drop unused @eslint/compat#183

Merged
philz3906 merged 1 commit into
mainfrom
dev/philz3906/eslint-gitignore
May 29, 2026
Merged

chore(lint): source ignores from .gitignore, drop unused @eslint/compat#183
philz3906 merged 1 commit into
mainfrom
dev/philz3906/eslint-gitignore

Conversation

@philz3906

@philz3906 philz3906 commented May 29, 2026

Copy link
Copy Markdown
Contributor

What

Feed .gitignore into the ESLint flat config and remove the now-redundant manual ignores.

  • Import includeIgnoreFile from eslint/config (exported there since the eslint 10 bump on main) and add it as the first config entry with { gitignoreResolution: true }.
  • Drop the manual ignores that .gitignore now covers: **/dist, **/debug, **/docs, **/types.
  • Drop **/lib and **/gen — neither directory exists in the repo.
  • Remove the unused @eslint/compat devDependency. It was never imported; includeIgnoreFile now comes from eslint/config directly (no replacement dep needed).

Remaining manual ignores are intentional — they are not covered by .gitignore: the config-file globs (**/*.config.{ts,js,cjs,mjs}), **/builtin, and the **/,.* dotfile pattern.

Why

The manual ignores list duplicated patterns already in .gitignore, so they drifted out of sync. Sourcing them from .gitignore keeps a single source of truth, and @eslint/compat was dead weight.

Verification

  • pnpm lint → exit 0.
  • Confirmed a src/builtin/*.ts file is still reported as ignored.
  • Verified eslint/config exports includeIgnoreFile at runtime on eslint 10.4.0.

🤖 Generated with Claude Code

@philz3906 philz3906 force-pushed the dev/philz3906/eslint-gitignore branch from b8f1d3d to cc026f8 Compare May 29, 2026 10:40
Use includeIgnoreFile from eslint/config (available since the eslint 10
bump) to feed .gitignore patterns into the flat config, then drop the
manual ignore entries it now duplicates (**/dist, **/debug, **/docs,
**/types). Also drop **/lib and **/gen, which matched nothing in the
repo. Remaining manual ignores (config files, builtin, dotfiles) are
not covered by .gitignore and stay.

Also remove the unused @eslint/compat devDependency — it was never
imported, and includeIgnoreFile now comes from eslint/config directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@philz3906 philz3906 force-pushed the dev/philz3906/eslint-gitignore branch from cc026f8 to 063c4ff Compare May 29, 2026 10:45
@philz3906 philz3906 merged commit 00dd9ae into main May 29, 2026
2 checks passed
@philz3906 philz3906 deleted the dev/philz3906/eslint-gitignore branch May 29, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant