feat(flat-config): add the seven flat configs and a rule-map parity gate (3/5)

Stage MR What it does
1 !170 (merged) freeze the eslintrc rule maps
2 !171 (merged) ESLint 9 + RuleTester specs
3 !172 (merged) ← you are here the seven flat configs (additive, deletes nothing)
4 !173 (merged) delete eslintrc, rewire entrypoints — cuts the release
5 !174 (merged) remove the parity gate now it has served its purpose

Merge in order; each MR targets the one before it, so the diff here is only this stage. Only stage 4 carries a changeset, so only stage 4 publishes.

What this does

Adds all seven flat configs — base, default, vue, jest, i18n, tailwind, typescript — alongside the eslintrc ones. Deletes nothing; stage 4 removes the old surface.

Each is asserted against the rule map stage 1 froze from its eslintrc counterpart, so a porting mistake fails a test rather than reaching a consumer.

How to review this

The parity test has already checked every rule in every config except those recorded in tests/fixtures/rule-maps/deltas.js. So the question is bounded: is each recorded divergence genuinely upstream, and is each reason true?

deltas.js groups entries under a named reason constant per cause, about thirteen of them — read the reasons, not the entries. That structure exists because the first version filed all 55 base deltas under one blanket "ESLint 9 only changed how it renders defaults", and two of them turned out to be real behaviour changes hiding under that label.

Counts: 55 for base, 6 for vue, 60 for default (55 inherited), 74 for typescript, zero for jest, i18n and tailwind. lib/prettier-rules.js strips 180 @stylistic/* entries before the gate sees them, so deltas.js alone understates the eslint-config-prettier v9→v10 major.

Three things the fixtures caught that reading a diff would not have

vue must target flat/vue2-recommended. v9's configs.recommended resolved to Vue 2; v10's flat/recommended is Vue 3. The obvious mapping would have silently added 33 rules and removed 6. The fixture settles it: it holds vue/no-v-for-template-key (Vue 2 only) and not its Vue 3 counterpart.

default cannot be [...base, ...vue]. The eslintrc chain put prettier before the vue preset, leaving six vue/* formatting rules at warn there and off in vue. lib/vue-fragments.js exists so neither config is a subtraction of the other — please don't let a later cleanup "simplify" it back.

Each config is an array of one object per eslintrc extends entry, not one merged object. Flat config only preserves inherited options across config objects, so collapsing base silently changes 56 rules.

Verification

528 passing (499 + 29 parity). No changeset.

🤖 Generated with Claude Code

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading
Loading