ESLint: Rename root eslint.config.cjs to eslint.config.mjs - #81468
Conversation
The .cjs extension was only needed in #77215 so git could detect the rename of the original eslint.config.mjs into tools/eslint/config.mjs. With that history recorded, the root file can be ESM again and use a static re-export instead of a dynamic import().
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 7.71 MB |
|
Flaky tests detected in 8ff6837. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/31569897293 does not dirty related template parts or navigation menus when rendered in the post editor in
|
Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
What?
Follow up to #77215.
Renames the root
eslint.config.cjstoeslint.config.mjsand replaces the dynamicimport()re-export with a staticexport { default }.Why?
#77215 kept the root file as CommonJS only so git would detect the rename of the original
eslint.config.mjsinto tools/eslint/config.mjs. That history is now recorded, so the root file can go back to ESM and drop the promise-returningimport()wrapper.How?
git mvto.mjsplus a one-line static re-export in eslint.config.mjs. Docs referencing the old filename are updated.Testing Instructions
npm run lint:jspasses..jsfile in VS Code and confirm ESLint squiggles still appear.var x = 1;in a package file and confirm it is reported.Testing Instructions for Keyboard
N/A, no UI changes.
Use of AI Tools
Authored with assistance from Claude Code (Claude Opus 5). All changes were reviewed and verified manually.