From 3d48af95b1483bd012b888ffd30e2f1682b39a7c Mon Sep 17 00:00:00 2001 From: huandrey Date: Wed, 2 Sep 2026 12:02:47 -0300 Subject: [PATCH 1/4] =?UTF-8?q?fix(sonar):=20javascript:S7747=20=E2=80=94?= =?UTF-8?q?=20remove=20unnecessary=20nested=20object=20spread=20in=20test-?= =?UTF-8?q?utils=20IntlProvider=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces {...messages, ...{'country.BRA': 'BRA'}} with {...messages, 'country.BRA': 'BRA'} — spreading a single-key object literal into another object literal is unnecessary; the direct key assignment produces the identical object. File: react/test-utils.js/index.js:13 Rule: javascript:S7747 --- react/test-utils.js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/test-utils.js/index.js b/react/test-utils.js/index.js index 3d856b6..b4c56e8 100644 --- a/react/test-utils.js/index.js +++ b/react/test-utils.js/index.js @@ -10,7 +10,7 @@ const renderWithIntl = (node) => { return render( {node} From 10c0691560c1271268d29e5a1db0d60baef84e24 Mon Sep 17 00:00:00 2001 From: huandrey Date: Wed, 2 Sep 2026 12:02:53 -0300 Subject: [PATCH 2/4] =?UTF-8?q?fix(sonar):=20javascript:S7747=20=E2=80=94?= =?UTF-8?q?=20remove=20unnecessary=20object-literal=20spread=20in=20test-u?= =?UTF-8?q?tils=20intl=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same pattern as the previous commit, at the renderWithModalState helper's IntlProvider. File: react/test-utils.js/index.js:43 Rule: javascript:S7747 --- react/test-utils.js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/test-utils.js/index.js b/react/test-utils.js/index.js index b4c56e8..a512f0c 100644 --- a/react/test-utils.js/index.js +++ b/react/test-utils.js/index.js @@ -40,7 +40,7 @@ const renderWithModalState = (node) => { > {node} From 45885ed5467835fe56b9a2e2ada4ce5be95871fc Mon Sep 17 00:00:00 2001 From: huandrey Date: Wed, 2 Sep 2026 12:03:51 -0300 Subject: [PATCH 3/4] style: reformat IntlProvider JSX after S7747 fix collapses onto one line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prettier reflow only, no functional change — a byproduct of the shorter spread from the previous commit now fitting the line-length limit. File: react/test-utils.js/index.js:11 --- react/test-utils.js/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/react/test-utils.js/index.js b/react/test-utils.js/index.js index a512f0c..2c9023d 100644 --- a/react/test-utils.js/index.js +++ b/react/test-utils.js/index.js @@ -8,10 +8,7 @@ import { SIDEBAR } from '../constants/index.js' const renderWithIntl = (node) => { return render( - + {node} ) From 0413abe718dd7497b64b2f86b58dbb602614f3f2 Mon Sep 17 00:00:00 2001 From: huandrey Date: Wed, 2 Sep 2026 15:38:59 -0300 Subject: [PATCH 4/4] docs: record the S7747 test-utils cleanup in the CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec8a73b..73a6c86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Removed unnecessary nested object-literal spreads in the `react/test-utils.js` `IntlProvider` message helpers (`javascript:S7747`). + ## [3.8.5] - 2026-08-31 ## [3.8.4] - 2026-08-31