feat(flat-config)!: remove the eslintrc configs and publish the flat ones (4/5)

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

What this does

Deletes the seven eslintrc configs and points the public surface at the flat configs from stage 3. The changeset lands here, so merging this publishes the major.

The most important thing in this release

TypeScript files were never actually parsed as TypeScript. lib/configs/typescript.js set parserOptions.parser inside an overrides block, which eslintrc ignores. The flat port sets languageOptions.parser correctly, so .ts files are parsed as TypeScript for the first time, type-aware rules begin doing real work, and consumers of the typescript config should expect a wave of new findings.

No test caught this and no delta records it — the parity gate compares resolved rules, not parsers. With stage 1's finding that the same config could never be installed from a clean install, that config was substantially broken and nobody noticed.

Breaking changes

Seven, all in the changeset. Two are easy to miss:

  • The eight lib/configs/base/ fragments stop being public configs. plugin:@gitlab/style, plugin:@gitlab/errors and six siblings were reachable because config discovery globbed recursively. Independent of the eslintrc removal; hits anyone who extended a fragment directly.
  • configs entries are lazy getters. Object.keys and for...in are safe; spread is not — { ...plugin.configs } invokes all seven and throws without the optional TypeScript peers, as do deep clone and JSON.stringify. They're getters because lib/flat-configs/typescript.js requires @typescript-eslint/eslint-plugin at module load and that's now an optional peer. Three tests cover it.

The fragment files stay on disk — lib/flat-configs/base.js reads their rules. Their env, parserOptions and plugins keys lost their last reader with the eslintrc configs, so they go too; the parity gate still passes, so no rule moved.

Expect downstream noise

25 rules change severity: 20 in typescript on .ts, 5 in vue/default, all listed in the changeset. Most likely to bite: vue/no-required-prop-with-default is newly on at warn, fires on unchanged Vue 2 code, and test-on-gitlab runs eslint --max-warnings 0.

The changeset has a What stops being caught table for the other direction — the five reductions where nothing in this package takes over (while (true), block-scoped function declarations, no-class-assign/no-with on .ts which tsc reports, and two deprecated formatting rules on .ts which prettier enforces). Everything else in the 25 is substitution.

test-on-gitlab and test-on-design-system fail here — those repos still consume the eslintrc configs. Both allow_failure: true. Sequencing the downstream migration is a team call.

Verification

537 passing (499 + 29 parity + 9 export/lazy-getter). All seven documented usage examples were run against the real package, including a type-aware run where no-floating-promises fired.

🤖 Generated with Claude Code

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading
Loading