Skip to content

Repair wp/5.1 branch Actions: Skip the ESLint rules the backported rich-text code breaks - #85671

Merged
desrosj merged 1 commit into
fix-actions-5.1/update-npm-package-json-lintfrom
fix-actions-5.1/fix-rich-text-backport-formatting
Oct 29, 2026
Merged

desrosj merged 1 commit into
fix-actions-5.1/update-npm-package-json-lintfrom
fix-actions-5.1/fix-rich-text-backport-formatting

Conversation

@desrosj

@desrosj desrosj commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Part of #83422.

What?

Turns off, in .eslintrc.js, the one ESLint rule that each of three @wordpress/rich-text files breaks, scoped to that file only:

File Rule turned off
packages/rich-text/src/to-tree.js no-mixed-spaces-and-tabs
packages/rich-text/src/test/insert-line-separator.js func-call-spacing
packages/rich-text/src/test/split.js space-in-parens

Why?

Static Analysis Lint JavaScript fails with:

packages/rich-text/src/test/insert-line-separator.js  49:22  error  Unexpected space between function name and paren  func-call-spacing
packages/rich-text/src/test/split.js                  155:28 error  There must be a space inside this paren          space-in-parens
packages/rich-text/src/to-tree.js                     35:2–43:2 error  Mixed spaces and tabs (9 lines)           no-mixed-spaces-and-tabs

All of it is already on wp/5.1: it came in with the 2021 backport of 1621f9c ("Keep track of replacements as a sparse array."), after this branch had stopped running CI.

How?

Fixing the whitespace would change @wordpress/rich-text on this branch with no functional reason. Overriding the rules in the root ESLint config instead leaves the package untouched. Every other rule still applies to these files, and these three rules still apply everywhere else.

Testing Instructions

Checked with this branch's ESLint (eslint@4.19.1, @wordpress/eslint-plugin from packages/eslint-plugin, and the plugin versions from package-lock.json): the base branch's config reports the 11 errors summarized above (9 in to-tree.js, 1 in each test), this PR's config reports none, and --print-config shows each file with only its own rule turned off.

In CI, Static Analysis passes at the top of the stack (#85677, run 40384935883).

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

🤖 Generated with Claude Code

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 26, 2026
@desrosj desrosj self-assigned this Oct 26, 2026
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 404e9643-3ac2-4a09-93af-0eb7d3e51e38

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 27, 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.

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: desrosj <desrosj@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@desrosj
desrosj force-pushed the fix-actions-5.1/fix-rich-text-backport-formatting branch from 63fc101 to c97016e Compare October 27, 2026 21:02

@andrewserong andrewserong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching off makes good sense, and these are just cosmetic rules. LGTM!

@desrosj
desrosj force-pushed the fix-actions-5.1/fix-rich-text-backport-formatting branch from c97016e to cd39cbe Compare October 29, 2026 12:48
@desrosj
desrosj removed this pull request from stack #85678 October 29, 2026 17:59
@desrosj
desrosj force-pushed the fix-actions-5.1/fix-rich-text-backport-formatting branch from cd39cbe to b9b5a21 Compare October 29, 2026 18:00
@desrosj
desrosj added this pull request to stack #85963 October 29, 2026 18:01
@desrosj
desrosj force-pushed the fix-actions-5.1/fix-rich-text-backport-formatting branch from b9b5a21 to efa575f Compare October 29, 2026 20:21
@desrosj
desrosj merged commit 511dcdb into wp/5.1 Oct 29, 2026
6 checks passed
@desrosj
desrosj deleted the fix-actions-5.1/fix-rich-text-backport-formatting branch October 29, 2026 20:23
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.

2 participants