feat(eslint-plugin-formatjs): autofix prefer-formatted-message - #7498
Merged
Merged
Conversation
longlho
marked this pull request as ready for review
September 24, 2026 12:46
longlho
enabled auto-merge (squash)
September 24, 2026 12:49
Merged
longlho
pushed a commit
that referenced
this pull request
Sep 24, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>formatjs_cli: 1.7.5</summary> ## [1.7.5](formatjs_cli_v1.7.4...formatjs_cli_v1.7.5) (2026-09-24) ### Bug Fixes * **@formatjs/cli:** prevent partial catalogs after read failures ([#7497](#7497)) ([a88ac15](a88ac15)) * **deps:** update oxc to 0.150 ([#7483](#7483)) ([25ba670](25ba670)) * **deps:** update ruff to v0.16.8 ([#7502](#7502)) ([0a41614](0a41614)) </details> <details><summary>@formatjs/cli: 6.16.32</summary> ## [6.16.32](https://github.com/formatjs/formatjs/compare/@formatjs/cli@6.16.31...@formatjs/cli@6.16.32) (2026-09-24) ### Dependencies * The following workspace dependencies were updated * optionalDependencies * @formatjs/cli-native-darwin-arm64 bumped to 1.1.26 * @formatjs/cli-native-linux-arm64 bumped to 1.2.26 * @formatjs/cli-native-linux-arm64-musl bumped to 1.0.24 * @formatjs/cli-native-linux-x64 bumped to 1.1.26 * @formatjs/cli-native-linux-x64-musl bumped to 1.0.24 * @formatjs/cli-native-win32-x64 bumped to 1.1.27 </details> <details><summary>@formatjs/cli-lib: 10.0.8</summary> ## [10.0.8](https://github.com/formatjs/formatjs/compare/@formatjs/cli-lib@10.0.7...@formatjs/cli-lib@10.0.8) (2026-09-24) ### Bug Fixes * **@formatjs/cli:** prevent partial catalogs after read failures ([#7497](#7497)) ([a88ac15](a88ac15)) ### Dependencies * The following workspace dependencies were updated * optionalDependencies * @formatjs/cli-native-darwin-arm64 bumped to 1.1.26 * @formatjs/cli-native-linux-arm64 bumped to 1.2.26 * @formatjs/cli-native-linux-arm64-musl bumped to 1.0.24 * @formatjs/cli-native-linux-x64 bumped to 1.1.26 * @formatjs/cli-native-linux-x64-musl bumped to 1.0.24 * @formatjs/cli-native-win32-x64 bumped to 1.1.27 </details> <details><summary>@formatjs/cli-native-darwin-arm64: 1.1.26</summary> ## [1.1.26](https://github.com/formatjs/formatjs/compare/@formatjs/cli-native-darwin-arm64@1.1.25...@formatjs/cli-native-darwin-arm64@1.1.26) (2026-09-24) </details> <details><summary>@formatjs/cli-native-linux-arm64: 1.2.26</summary> ## [1.2.26](https://github.com/formatjs/formatjs/compare/@formatjs/cli-native-linux-arm64@1.2.25...@formatjs/cli-native-linux-arm64@1.2.26) (2026-09-24) </details> <details><summary>@formatjs/cli-native-linux-arm64-musl: 1.0.24</summary> ## [1.0.24](https://github.com/formatjs/formatjs/compare/@formatjs/cli-native-linux-arm64-musl@1.0.23...@formatjs/cli-native-linux-arm64-musl@1.0.24) (2026-09-24) </details> <details><summary>@formatjs/cli-native-linux-x64: 1.1.26</summary> ## [1.1.26](https://github.com/formatjs/formatjs/compare/@formatjs/cli-native-linux-x64@1.1.25...@formatjs/cli-native-linux-x64@1.1.26) (2026-09-24) </details> <details><summary>@formatjs/cli-native-linux-x64-musl: 1.0.24</summary> ## [1.0.24](https://github.com/formatjs/formatjs/compare/@formatjs/cli-native-linux-x64-musl@1.0.23...@formatjs/cli-native-linux-x64-musl@1.0.24) (2026-09-24) </details> <details><summary>@formatjs/cli-native-win32-x64: 1.1.27</summary> ## [1.1.27](https://github.com/formatjs/formatjs/compare/@formatjs/cli-native-win32-x64@1.1.26...@formatjs/cli-native-win32-x64@1.1.27) (2026-09-24) </details> <details><summary>@formatjs/intl-locale: 5.3.12</summary> ## [5.3.12](https://github.com/formatjs/formatjs/compare/@formatjs/intl-locale@5.3.11...@formatjs/intl-locale@5.3.12) (2026-09-24) ### Dependencies * The following workspace dependencies were updated * dependencies * @formatjs/intl-supportedvaluesof bumped to 2.3.11 </details> <details><summary>@formatjs/intl-supportedvaluesof: 2.3.11</summary> ## [2.3.11](https://github.com/formatjs/formatjs/compare/@formatjs/intl-supportedvaluesof@2.3.10...@formatjs/intl-supportedvaluesof@2.3.11) (2026-09-24) ### Bug Fixes * **deps:** update oxc to 0.150 ([#7483](#7483)) ([25ba670](25ba670)) </details> <details><summary>eslint-plugin-formatjs: 8.1.0</summary> ## [8.1.0](https://github.com/formatjs/formatjs/compare/eslint-plugin-formatjs@8.0.5...eslint-plugin-formatjs@8.1.0) (2026-09-24) ### Features * **eslint-plugin-formatjs:** autofix prefer-formatted-message ([#7498](#7498)) ([5ccbc3a](5ccbc3a)) </details> <details><summary>react-intl: 12.1.3</summary> ## [12.1.3](https://github.com/formatjs/formatjs/compare/react-intl@12.1.2...react-intl@12.1.3) (2026-09-24) ### Bug Fixes * **deps:** update dependency @formatjs/icu-messageformat-parser to v3.5.19 ([#7496](#7496)) ([9cdcee7](9cdcee7)) * **deps:** update formatjs monorepo ([#7468](#7468)) ([de413f4](de413f4)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rule reports imperative formatter calls in JSX but leaves every conversion manual.
Add autofix for direct JSX children from React Intl
useIntl()bindings, including destructured aliases. Preserve descriptor/value expressions, reuse component imports, and merge collision-safe aliases into existing imports. Also check fragment children.Keep unverified formatter bindings, optional calls, options, type arguments, comments, and unsafe descriptors report-only. Retain hook calls to preserve hook ordering. Document these boundaries and cover import safety and ESLint multipass convergence.