Skip to content

CRAFT-2074: eslint9 migration#3221

Closed
valoriecarli wants to merge 1 commit intomainfrom
CRAFT-2074-eslint-v9-migration-with-guide
Closed

CRAFT-2074: eslint9 migration#3221
valoriecarli wants to merge 1 commit intomainfrom
CRAFT-2074-eslint-v9-migration-with-guide

Conversation

@valoriecarli
Copy link
Contributor

ESLint 9 Flat Config Migration

⚠️ Do not merge as-is. The vendor/commercetools-frontend-eslint-config-mc-app-26.0.0.tgz tarball is committed temporarily for CI. Once the appkit PR lands and the package is published, replace the file:./vendor/... reference in package.json with the versioned npm reference & delete the tarball + vendor/ directory.


What changed

Migrated from ESLint 8 legacy config (.eslintrc.js) to ESLint 9 flat config (eslint.config.js) following the MIGRATION.md guide shipped with @commercetools-frontend/eslint-config-mc-app@26.0.0.

Standard migration steps (per guide):

  • Removed .eslintrc.js and .eslintignore
  • Created eslint.config.js and spreads mcAppConfig, converts overrides to flat config objects, converts .eslintignore patterns to ignores array
  • Bumped eslint 8.x → ^9.0.0 and eslint-config-mc-app to 26.0.0

UI-KIT specific:

  • Added globals.jest + puppeteer globals (page, HOST) for **/*.visualspec.js. The base config only injects jest globals for *.{spec,test}.js
  • Added globals.jest for **/*.bundlespec.js, same as above
  • Removed stale eslint-disable inline comments in test/setup-tests.js and packages/utils/src/warning.ts that referenced plugins not registered for those file types in flat config
  • Removed generators/ from ignores and fixed pre-existing violations that were previously hidden: import/first ordering in generator bin files, unused catch binding in generators/readme/src/index.ts, and inlineCode function hoisting
  • Added generators/readme/test/ to ignores. Test fixtures use fake package names that don't resolve
  • Updated jest-runner-eslint.config.js formatter from stylish → eslint-formatter-pretty

@valoriecarli valoriecarli self-assigned this Feb 18, 2026
@vercel
Copy link

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ui-kit Ready Ready Preview, Comment Feb 18, 2026 5:07pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 18, 2026

⚠️ No Changeset found

Latest commit: cfa56fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@valoriecarli valoriecarli added the 🚧 Status: WIP Work in progress label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 Status: WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant