Skip to content

Remove fixable on i18n-no-flanking-whitespace - #70279

Merged
ramonjd merged 5 commits into
WordPress:trunkfrom
jeremyfelt:fix/remove-i18n-flanking-whitespace-fixer
Aug 25, 2026
Merged

Remove fixable on i18n-no-flanking-whitespace#70279
ramonjd merged 5 commits into
WordPress:trunkfrom
jeremyfelt:fix/remove-i18n-flanking-whitespace-fixer

Conversation

@jeremyfelt

Copy link
Copy Markdown
Member

What?

Remove the fixable configuration on i18n-no-flanking-whitespace

Why?

Auto-fixing flanking whitespace inside translation strings can lead to unintended regressions when those translations are joined with other strings. These should be marked as errors, but left to be addressed manually.

Example:

__( 'Edit or update ', 'my-project' ) + documentName

Reads as "Edit or update document name" before applying a fix and "Edit or updatedocument name" after applying a fix.

The complexities of the fixer were discussed a bit on the original PR here: #38225 (comment)

How?

  • Remove the fixable configuration option
  • Remove the fixer function

Auto-fixing flanking whitespace inside translation strings can
lead to unintended regressions when those translations are
joined with other strings. These should be marked as errors,
but left to be addressed manually.

Example:

```
__( 'Edit or update ', 'my-project' ) + documentName
```

Reads as "Edit or update document name" before applying a fix and
"Edit or updatedocument name" after applying a fix.

The complexities of the fixer were discussed a bit on the original
PR here: WordPress#38225 (comment)
@jeremyfelt jeremyfelt added the [Tool] ESLint plugin /packages/eslint-plugin label May 30, 2025
@github-actions

github-actions Bot commented May 30, 2025

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: jeremyfelt <jeremyfelt@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>

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

Do not expect auto-fixed output when running tests
@jeremyfelt jeremyfelt added the [Type] Bug An existing feature does not function as intended label Jun 11, 2025
@jeremyfelt

Copy link
Copy Markdown
Member Author

Related, in a similar issue/PR in WPCS WordPress/WordPress-Coding-Standards#2501

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry that this has been open for so long.

Reading the comments in #38225 (comment) it seems like a dood option to just remove it.

Comment thread packages/eslint-plugin/CHANGELOG.md Outdated
@ramonjd
ramonjd requested a balanced review from Copilot August 25, 2026 04:30

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ramonjd
ramonjd enabled auto-merge (squash) August 25, 2026 04:31
@ramonjd
ramonjd merged commit 68a8d4d into WordPress:trunk Aug 25, 2026
43 checks passed
@github-actions github-actions Bot added this to the Gutenberg 23.9 milestone Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Tool] ESLint plugin /packages/eslint-plugin [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants