Skip to content

Commit

Permalink
Deps: Update prettier to 3.3.3 and add stylelint-prettier rules
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Aug 26, 2024
1 parent 227ae39 commit 6840e83
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 21 deletions.
1 change: 0 additions & 1 deletion .prettierrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": [
"@almacareer/stylelint-config"
"@almacareer/stylelint-config",
"stylelint-prettier/recommended"
],
"rules": {
"no-descending-specificity": null,
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@lmc-eu/commitlint-config": "1.0.16",
"@lmc-eu/conventional-changelog-lmc-github": "2.3.0",
"@lmc-eu/eslint-config-base": "3.0.2",
"@lmc-eu/prettier-config": "1.2.3",
"@lmc-eu/prettier-config": "2.0.1",
"@types/jest": "29.5.12",
"@types/node": "18.11.11",
"@typescript-eslint/eslint-plugin": "5.45.1",
Expand All @@ -108,12 +108,14 @@
"npm-run-all": "4.1.5",
"postcss": "8.4.38",
"postcss-cli": "10.1.0",
"prettier": "2.8.0",
"prettier": "3.3.3",
"replace-in-file": "6.3.5",
"sass": "1.56.1",
"stylelint": "16.8.2",
"stylelint-prettier": "^5.0.2",
"ts-jest": "29.1.2",
"ts-node": "10.9.2",
"typescript": "4.9.3"
}
},
"prettier": "@lmc-eu/prettier-config"
}
19 changes: 11 additions & 8 deletions src/languages/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ export const assembleLanguagesConfig = (
secondaryButtonMode: string,
cookieTable: CookieTable,
): Record<string, VanillaCookieConsent.Languages> =>
Object.entries(languagesMap).reduce((languagesConfig, [code, configFunction]) => {
languagesConfig[code] = configFunction(
{ companyNames, ...translationOverrides[code] },
secondaryButtonMode,
cookieTable[code] || {},
);
Object.entries(languagesMap).reduce(
(languagesConfig, [code, configFunction]) => {
languagesConfig[code] = configFunction(
{ companyNames, ...translationOverrides[code] },
secondaryButtonMode,
cookieTable[code] || {},
);

return languagesConfig;
}, {} as Record<string, VanillaCookieConsent.Languages>);
return languagesConfig;
},
{} as Record<string, VanillaCookieConsent.Languages>,
);
/* eslint-enable no-param-reassign */
23 changes: 15 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2153,10 +2153,10 @@
eslint-plugin-import "^2.25.2"
eslint-plugin-jsdoc "^46.0.0"

"@lmc-eu/prettier-config@1.2.3":
version "1.2.3"
resolved "https://registry.yarnpkg.com/@lmc-eu/prettier-config/-/prettier-config-1.2.3.tgz#1d3cc3f06da55992bd04a492b22ff913684b9a67"
integrity sha512-XOBMJeFpJyy9siRtyEzGS2U37B2Sikr6xUJ9d4JYFH7IOESs9/awIdcPrEqj8x5KnUrWeei8EyAnj3yKH/k68w==
"@lmc-eu/prettier-config@2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@lmc-eu/prettier-config/-/prettier-config-2.0.1.tgz#eaf6de5664cea7c25ed295220394edf666163d3e"
integrity sha512-kkLTgPKcHL/N7fylhKImfOkxhCmB4uQBfroF3z0+O8qHO4qDZ/KnDGidtdgE4gqfpC/ShFtx1JZINyzCVyMi1g==

"@lmc-eu/spirit-design-tokens@^1.1.3":
version "1.1.3"
Expand Down Expand Up @@ -5993,10 +5993,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9"
integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==
prettier@3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==

pretty-format@^29.0.0, pretty-format@^29.7.0:
version "29.7.0"
Expand Down Expand Up @@ -6710,6 +6710,13 @@ stylelint-order@^6.0.0:
postcss "^8.4.32"
postcss-sorting "^8.0.2"

stylelint-prettier@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/stylelint-prettier/-/stylelint-prettier-5.0.2.tgz#82c0a813d8981fe094fca28126fc88cee22fa789"
integrity sha512-qJ+BN+1T2ZcKz9WIrv0x+eFGHzSUnXfXd5gL///T6XoJvr3D8/ztzz2fhtmXef7Vb8P33zBXmLTTveByr0nwBw==
dependencies:
prettier-linter-helpers "^1.0.0"

stylelint-scss@^6.4.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-6.5.0.tgz#c5495f254195c41b97f9bc995e4d3725b375447a"
Expand Down

0 comments on commit 6840e83

Please sign in to comment.