Skip to content

Commit cdf109b

Browse files
scottschreckengaustclaudekrokoko
authored
feat(tooling): upgrade ESLint 9 → 10 with flat config migration (#171)
* chore(deps): upgrade eslint 9->10, replace import plugin with import-x - eslint ^9 -> ^10 (10.4.0) - @cdklabs/eslint-plugin ^1 -> ^2 (flat config support) - eslint-plugin-import removed (no ESLint 10 support) - eslint-plugin-import-x ^4 added (drop-in replacement) - eslint-import-resolver-typescript removed (import-x has built-in TS resolution) - Root resolution for eslint-plugin-import/minimatch removed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(eslint): migrate cdk/ to ESLint 10 flat config Convert .eslintrc.json to eslint.config.mjs (ESM flat config format). Replace import/ rule prefix with import-x/. Remove --ext flag and ESLINT_USE_FLAT_CONFIG env var from the eslint script. All existing rules preserved with equivalent flat config syntax. Four @cdklabs rules (no-core-construct, invalid-cfn-imports, no-literal-partition, no-invalid-path) are temporarily disabled because they use context.getFilename() which was removed in ESLint 10. Stale eslint-disable comments for disabled/absent rules removed by auto-fix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(eslint): migrate cli/ to ESLint 10 flat config Convert .eslintrc.json to eslint.config.mjs. Replace import/ rule prefix with import-x/. Remove --ext flag and ESLINT_USE_FLAT_CONFIG. All existing rules preserved including no-console override for src/. Removed stale no-constant-condition disable comments (rule deprecated in ESLint 10). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(eslint): restore eslint-import-resolver-typescript for import-x The resolver is required by eslint-plugin-import-x for TypeScript path resolution. Was incorrectly removed in the package upgrade commit. Also disable license-header rule for shebang bin files (workaround). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(eslint): remove stale suppressions from merged attachments code ESLint --fix removes no-op suppression comments for rules not enabled in our config. These were introduced by the attachments PR (#176) merge and are cleaned up by the new ESLint 10 flat config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: bgagent <345885+scottschreckengaust@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Alain Krok <alkrok@amazon.com>
1 parent 04a65a3 commit cdf109b

23 files changed

Lines changed: 829 additions & 1928 deletions

cdk/.eslintrc.json

Lines changed: 0 additions & 385 deletions
This file was deleted.

0 commit comments

Comments
 (0)