Skip to content

ESLint: Rename root eslint.config.cjs to eslint.config.mjs - #81468

Merged
manzoorwanijk merged 1 commit into
trunkfrom
rename/root-eslint-config-to-mjs
Aug 12, 2026
Merged

ESLint: Rename root eslint.config.cjs to eslint.config.mjs#81468
manzoorwanijk merged 1 commit into
trunkfrom
rename/root-eslint-config-to-mjs

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Member

What?

Follow up to #77215.

Renames the root eslint.config.cjs to eslint.config.mjs and replaces the dynamic import() re-export with a static export { default }.

Why?

#77215 kept the root file as CommonJS only so git would detect the rename of the original eslint.config.mjs into tools/eslint/config.mjs. That history is now recorded, so the root file can go back to ESM and drop the promise-returning import() wrapper.

How?

git mv to .mjs plus a one-line static re-export in eslint.config.mjs. Docs referencing the old filename are updated.

Testing Instructions

  1. npm run lint:js passes.
  2. Open a .js file in VS Code and confirm ESLint squiggles still appear.
  3. Introduce 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.

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().
@manzoorwanijk manzoorwanijk self-assigned this Aug 12, 2026
@manzoorwanijk manzoorwanijk added [Type] Code Quality Issues or PRs that relate to code quality [Type] Task Issues or PRs that have been broken down into an individual action to take and removed [Type] Code Quality Issues or PRs that relate to code quality labels Aug 12, 2026
@manzoorwanijk
manzoorwanijk marked this pull request as ready for review August 12, 2026 06:27
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 7.71 MB

compressed-size-action

@manzoorwanijk
manzoorwanijk enabled auto-merge (squash) August 12, 2026 06:31
@github-actions

Copy link
Copy Markdown

Flaky tests detected in 8ff6837.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/31569897293
📝 Reported tests:

does not dirty related template parts or navigation menus when rendered in the post editor in /test/e2e/specs/editor/blocks/navigation-passive-rendering.spec.js, passed after 1 failed attempt.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → GET http://localhost:8889/wp-json/wp/v2/templates
    - user-agent: Playwright/1.62.1 (x64; ubuntu 24.04) node/20.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: 01e8716472
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1786688976%7CWWacUZYMFW9RSoM6oy4E84PjnmHxNy7vzdErsGworzo%7C3282faac4e5de507aa2bf902d213c9f8179feb90a8d9a0bf762ac2963f447e55; wp-settings-time-1=1786516266

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:112:39)
    at RequestUtils.deleteAllTemplates (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/templates.ts:35:31)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/navigation-passive-rendering.spec.js:48:17
should show the admin bar in /test/e2e/specs/editor/various/fullscreen-mode.spec.js, passed after 1 failed attempt.
Error: apiRequestContext.get: socket hang up
Call log:
  - → GET http://localhost:8889/wp-admin/themes.php?action=activate&stylesheet=emptytheme&_wpnonce=bdc64357a6
    - user-agent: Playwright/1.62.1 (x64; ubuntu 24.04) node/20.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_23778236db82f19306f247e20a353a99=admin%7C1786688996%7C9z7BcqNteVziVQM9sSgzNs7ZUC6fBHHIMIwhLsRaRoS%7Ce3e630b3b30b5d3b08a053a09198a2794606248e1deedfd37d7badc1d4892080; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1786688996%7C9z7BcqNteVziVQM9sSgzNs7ZUC6fBHHIMIwhLsRaRoS%7C98feca5457c70cb316c6e41fc915b0e1afe306267adb7dcd3521ccf0b6714679; wp-settings-time-1=1786516540; wp-settings-1=editor%3Dtinymce
  - ← 302 Found
    - date: Wed, 12 Aug 2026 06:37:58 GMT
    - server: Apache/2.4.68 (Debian)
    - x-powered-by: PHP/8.3.33
    - expires: Wed, 11 Jan 1984 05:00:00 GMT
    - cache-control: no-cache, must-revalidate, max-age=0, private
    - referrer-policy: strict-origin-when-cross-origin
    - x-frame-options: SAMEORIGIN
    - content-security-policy: frame-ancestors 'self';
    - x-redirect-by: WordPress
    - location: http://localhost:8889/wp-admin/themes.php?activated=true
    - server-timing: wpTotal;dur=26.36, wpMemoryUsage;dur=4805104, wpDbQueries;dur=43
    - content-length: 0
    - keep-alive: timeout=5, max=93
    - connection: Keep-Alive
    - content-type: text/html; charset=UTF-8
  - → GET http://localhost:8889/wp-admin/themes.php?activated=true
    - user-agent: Playwright/1.62.1 (x64; ubuntu 24.04) node/20.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - host: localhost:8889
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_23778236db82f19306f247e20a353a99=admin%7C1786688996%7C9z7BcqNteVziVQM9sSgzNs7ZUC6fBHHIMIwhLsRaRoS%7Ce3e630b3b30b5d3b08a053a09198a2794606248e1deedfd37d7badc1d4892080; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1786688996%7C9z7BcqNteVziVQM9sSgzNs7ZUC6fBHHIMIwhLsRaRoS%7C98feca5457c70cb316c6e41fc915b0e1afe306267adb7dcd3521ccf0b6714679; wp-settings-time-1=1786516540; wp-settings-1=editor%3Dtinymce

    at RequestUtils.activateTheme (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/themes.ts:45:32)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/fullscreen-mode.spec.js:87:4

@manzoorwanijk
manzoorwanijk merged commit 59965b3 into trunk Aug 12, 2026
65 checks passed
@manzoorwanijk
manzoorwanijk deleted the rename/root-eslint-config-to-mjs branch August 12, 2026 06:59
@github-actions github-actions Bot added this to the Gutenberg 23.8 milestone Aug 12, 2026
@sirreal sirreal added [Type] Build Tooling Issues or PRs related to build tooling and removed [Type] Task Issues or PRs that have been broken down into an individual action to take labels Aug 12, 2026
shail-mehta pushed a commit that referenced this pull request Aug 12, 2026
Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants