Skip to content

Commit

Permalink
Update prettier & stylelint-prettier packages to latest
Browse files Browse the repository at this point in the history
+ configuration so that it all pays together (exlint + prettier)
  • Loading branch information
Adamik10 committed Dec 28, 2024
1 parent 1a40807 commit e54385b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
6 changes: 5 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": ["stylelint-config-recommended-scss", "stylelint-prettier/recommended"],
"extends": [
"stylelint-config-recommended-scss",
"stylelint-prettier/recommended",
"prettier"
],
"plugins": ["@namics/stylelint-bem"],
"rules": {
"plugin/stylelint-bem-namics": {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"postcss-cli": "^11.0.0",
"postcss-loader": "^8.1.1",
"postcss-scss": "^4.0.9",
"prettier": "3.0.0",
"prettier": "3.4.2",
"replace-in-file": "^6.3.2",
"sass": "^1.83.0",
"source-map-support": "^0.5.21",
Expand All @@ -129,7 +129,7 @@
"stylelint": "^15.11.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended-scss": "^6.0.0",
"stylelint-prettier": "4.0.0",
"stylelint-prettier": "5.0.2",
"stylelint-scss": "^6.10.0",
"stylelint-webpack-plugin": "^5.0.1",
"svg-url-loader": "^8.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getReservationsForSaving = ({
selectedBranch: string;
}) => {
const getSelectedExpiryDate = (value: FormSelectValue) =>
typeof value === "number" ? getFutureDateString(value) : expiryDate ?? "";
typeof value === "number" ? getFutureDateString(value) : (expiryDate ?? "");
const getSelectedPickupBranch = (value: FormSelectValue) =>
typeof value === "string" ? value : selectedBranch;

Expand Down
4 changes: 2 additions & 2 deletions src/components/material/MaterialHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const MaterialHeader: React.FC<MaterialHeaderProps> = ({
);
};
const author = creatorsToString(flattenCreators(creators), t);
const containsDanish = mainLanguages.some(
(language) => language?.isoCode.toLowerCase().includes("dan")
const containsDanish = mainLanguages.some((language) =>
language?.isoCode.toLowerCase().includes("dan")
);
const allLanguages = mainLanguages
.map((language) => language.display)
Expand Down
5 changes: 2 additions & 3 deletions src/core/utils/useReservableFromAnotherLibrary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ const useReservableFromAnotherLibrary = (
}

const reservablePidsFromAnotherLibrary = manifestations
.filter(
({ catalogueCodes }) =>
catalogueCodes?.otherCatalogues.some((code) => code.startsWith("OVE"))
.filter(({ catalogueCodes }) =>
catalogueCodes?.otherCatalogues.some((code) => code.startsWith("OVE"))
)
.map(({ pid }) => pid);

Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10871,10 +10871,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.0.tgz#e7b19f691245a21d618c68bc54dc06122f6105ae"
integrity sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==
prettier@3.4.2:
version "3.4.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f"
integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==

pretty-bytes@^5.6.0:
version "5.6.0"
Expand Down Expand Up @@ -12508,10 +12508,10 @@ stylelint-config-recommended@^7.0.0:
resolved "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-7.0.0.tgz"
integrity sha512-yGn84Bf/q41J4luis1AZ95gj0EQwRX8lWmGmBwkwBNSkpGSpl66XcPTulxGa/Z91aPoNGuIGBmFkcM1MejMo9Q==

stylelint-prettier@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/stylelint-prettier/-/stylelint-prettier-4.0.0.tgz#e04f33bf9968a5d5478d2d11b20bdc5a7de2dc35"
integrity sha512-hYlObunQiSzc5XRttNiDyaY1W7ytW/AJtEbaDxy0rr4ioQvko+cjAgSGrRbz0iRB+yc6jiMrUmHcGkvFb+zDqw==
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"

Expand Down

0 comments on commit e54385b

Please sign in to comment.