From f78f1c203349d5f63f5e111c2b3e5297cde467ac Mon Sep 17 00:00:00 2001 From: Anna Wen <54281166+annawen1@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:56:45 -0400 Subject: [PATCH] chore(tests): fix ci-check (#10954) --- .../carbon-web-components/src/components/tabs/tabs.scss | 2 +- packages/services/src/services/Locale/Locale.js | 6 ++++-- .../src/services/Translation/__tests__/Translation.test.js | 6 +++--- .../rules/limit-language-features.js | 4 ++-- .../scss/components/leadspace-block/_leadspace-block.scss | 2 +- .../leadspace-with-search/_leadspace-with-search.scss | 2 +- packages/styles/scss/components/leadspace/_leadspace.scss | 2 +- packages/styles/scss/themes/expressive/components/_tag.scss | 2 +- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/carbon-web-components/src/components/tabs/tabs.scss b/packages/carbon-web-components/src/components/tabs/tabs.scss index a898f27505c..c5486eb64c4 100644 --- a/packages/carbon-web-components/src/components/tabs/tabs.scss +++ b/packages/carbon-web-components/src/components/tabs/tabs.scss @@ -134,7 +134,7 @@ $inset-transition: inset 110ms motion(standard, productive); height: $spacing-09; padding: $spacing-03 $spacing-05; // height - vertical padding - /* stylelint-disable declaration-property-unit-whitelist */ + /* stylelint-disable declaration-property-unit-allowed-list */ line-height: calc(#{$spacing-09} - (#{$spacing-03} * 2)); } } diff --git a/packages/services/src/services/Locale/Locale.js b/packages/services/src/services/Locale/Locale.js index 91b54786606..76172a9e829 100644 --- a/packages/services/src/services/Locale/Locale.js +++ b/packages/services/src/services/Locale/Locale.js @@ -14,8 +14,10 @@ import root from 'window-or-global'; * @constant {string | string} Host for the Locale API call * @private */ -const _host = process && process.env.TRANSLATION_HOST; -('https://1.www.s81c.com'); +const _host = + (process && + (process.env.REACT_APP_TRANSLATION_HOST || process.env.TRANSLATION_HOST)) || + 'https://1.www.s81c.com'; /** * Sets the default location if nothing is returned diff --git a/packages/services/src/services/Translation/__tests__/Translation.test.js b/packages/services/src/services/Translation/__tests__/Translation.test.js index 16603b729bc..0bb5df4c66a 100755 --- a/packages/services/src/services/Translation/__tests__/Translation.test.js +++ b/packages/services/src/services/Translation/__tests__/Translation.test.js @@ -153,7 +153,7 @@ describe('TranslationAPI', () => { href: 'https://www.loremipsum.com', }; - const expectedSessionKey = 'cds-translation-us-en'; + const expectedSessionKey = 'c4d-translation-us-en'; await TranslationAPI.getTranslation({ lc: 'en', @@ -167,7 +167,7 @@ describe('TranslationAPI', () => { it('should return a json with a recent timestamp', async () => { // using very old cached session sessionStorageMock.setItem( - 'cds-translation-us-en', + 'c4d-translation-us-en', JSON.stringify(Object.assign(oldSession, { CACHE: true })) ); @@ -177,7 +177,7 @@ describe('TranslationAPI', () => { }); const newSession = JSON.parse( - sessionStorageMock.getItem('cds-translation-us-en') + sessionStorageMock.getItem('c4d-translation-us-en') ); // fresh data would lack this property diff --git a/packages/stylelint-config-ibmdotcom/rules/limit-language-features.js b/packages/stylelint-config-ibmdotcom/rules/limit-language-features.js index 3a5f63e78dd..4a891accb5e 100644 --- a/packages/stylelint-config-ibmdotcom/rules/limit-language-features.js +++ b/packages/stylelint-config-ibmdotcom/rules/limit-language-features.js @@ -74,14 +74,14 @@ module.exports = { 'declaration-property-unit-blacklist': OFF, // Specify a whitelist of allowed property and unit pairs within // declarations. - 'declaration-property-unit-whitelist': { + 'declaration-property-unit-allowed-list': { 'font-size': ['rem', '%', 'vw'], '/^animation/': ['ms'], 'line-height': ['rem'], }, // Specify a blacklist of disallowed property and value pairs within // declarations. - 'declaration-property-value-blacklist': { + 'declaration-property-value-disallowed-list': { // Disallow unset as it is unsupported in IE11 '/.*/': ['unset'], }, diff --git a/packages/styles/scss/components/leadspace-block/_leadspace-block.scss b/packages/styles/scss/components/leadspace-block/_leadspace-block.scss index ebe3f10d27b..9f8c8edef03 100644 --- a/packages/styles/scss/components/leadspace-block/_leadspace-block.scss +++ b/packages/styles/scss/components/leadspace-block/_leadspace-block.scss @@ -78,7 +78,7 @@ /* stylelint-disable declaration-no-important */ ::slotted(h1) { - all: unset !important; /* stylelint-disable-line declaration-property-value-blacklist */ + all: unset !important; /* stylelint-disable-line declaration-property-value-disallowed-list */ } /* stylelint-enable declaration-no-important */ diff --git a/packages/styles/scss/components/leadspace-with-search/_leadspace-with-search.scss b/packages/styles/scss/components/leadspace-with-search/_leadspace-with-search.scss index b744e0d4d67..c301a1a9df5 100644 --- a/packages/styles/scss/components/leadspace-with-search/_leadspace-with-search.scss +++ b/packages/styles/scss/components/leadspace-with-search/_leadspace-with-search.scss @@ -345,7 +345,7 @@ /* stylelint-disable declaration-no-important */ ::slotted(h1) { - all: unset !important; /* stylelint-disable-line declaration-property-value-blacklist */ + all: unset !important; /* stylelint-disable-line declaration-property-value-disallowed-list */ } /* stylelint-enable declaration-no-important */ } diff --git a/packages/styles/scss/components/leadspace/_leadspace.scss b/packages/styles/scss/components/leadspace/_leadspace.scss index c0278fd1339..2a42db61c83 100644 --- a/packages/styles/scss/components/leadspace/_leadspace.scss +++ b/packages/styles/scss/components/leadspace/_leadspace.scss @@ -477,7 +477,7 @@ $btn-min-width: 26; /* stylelint-disable declaration-no-important */ ::slotted(h1) { - all: unset !important; /* stylelint-disable-line declaration-property-value-blacklist */ + all: unset !important; /* stylelint-disable-line declaration-property-value-disallowed-list */ } /* stylelint-enable declaration-no-important */ } diff --git a/packages/styles/scss/themes/expressive/components/_tag.scss b/packages/styles/scss/themes/expressive/components/_tag.scss index 7c1a9649eb3..039f955d9f1 100644 --- a/packages/styles/scss/themes/expressive/components/_tag.scss +++ b/packages/styles/scss/themes/expressive/components/_tag.scss @@ -18,7 +18,7 @@ .#{$prefix}--tag { @include type-style('label-01'); - /* stylelint-disable-next-line declaration-property-unit-whitelist */ + /* stylelint-disable-next-line declaration-property-unit-allowed-list */ line-height: rem(20px); height: $spacing-07; /* carbon--container-02 */