Skip to content

Migrate to ESLint flat config (eslint-config-domdomegg v2) - #13

Merged
domdomegg merged 1 commit into
masterfrom
migrate-eslint-flat-config
Jul 9, 2026
Merged

domdomegg merged 1 commit into
masterfrom
migrate-eslint-flat-config

Conversation

@domdomegg

Copy link
Copy Markdown
Owner

Migrates ESLint from eslint-config-domdomegg v1 (legacy eslintConfig in package.json) to v2 flat config.

Changes

  • Bump eslint-config-domdomegg ^1.2.0^2.0.9 and eslint ^8^9.
  • Remove the eslintConfig key from package.json; add a flat eslint.config.mjs.
  • Port the old ignorePatterns: ["sample_configs"] → a { ignores: ["sample_configs/**"] } object before the preset spread.
  • Simplify the lint script to "lint": "eslint".
  • Reformat sources via eslint --fix (spaces → tabs, brace-wrapped single-line ifs, type-only import modifiers, object-type separators). The large source diff is entirely mechanical — no logic changes.

Three small fixes were needed to satisfy the stricter v2 ruleset (not suppressions):

  • cli.ts: errorPrefix + eerrorPrefix + String(e) (e is unknown in the catch).
  • core.ts: code += language.valueString(language.value) (jsonc-parser Node.value is any).
  • fsGenerator.test.ts: parenthesize 5 + (langs.length * 2) for no-mixed-operators.

Status

  • Lint: clean (npx eslint passes; only a harmless "react package not installed" warning inherent to the shared preset).
  • Build: passes (npm run build).
  • Tests: all pass (34 tests, 49 snapshots).

🤖 Generated with Claude Code

Bump eslint-config-domdomegg to ^2 and eslint to ^9, replace the legacy
eslintConfig/.eslintrc with a flat eslint.config.mjs, and reformat sources
to the preset's style via `eslint --fix`. The large source diff is entirely
mechanical reindentation — no logic changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@domdomegg
domdomegg merged commit 25d5f54 into master Jul 9, 2026
4 checks passed
@domdomegg
domdomegg deleted the migrate-eslint-flat-config branch July 9, 2026 22:33
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