From 5418cf3952ce95b56599354635adb6a659aa8344 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:03:48 +0000 Subject: [PATCH 1/4] Deps: Update dependency stylelint to v16 --- configs/stylelint-config-spirit/package.json | 10 +- packages/design-tokens/package.json | 2 +- packages/web/package.json | 4 +- yarn.lock | 463 ++++++++++--------- 4 files changed, 253 insertions(+), 226 deletions(-) diff --git a/configs/stylelint-config-spirit/package.json b/configs/stylelint-config-spirit/package.json index 8ed7aa078b..ce09384bd1 100644 --- a/configs/stylelint-config-spirit/package.json +++ b/configs/stylelint-config-spirit/package.json @@ -23,12 +23,12 @@ "type": "commonjs", "main": "./index.js", "peerDependencies": { - "stylelint": "^15.11.0" + "stylelint": "^15.11.0 || ^16.0.0" }, "dependencies": { - "@lmc-eu/stylelint-config": "8.0.0", - "stylelint": "15.11.0", - "stylelint-config-prettier": "9.0.5", - "stylelint-order": "6.0.4" + "@almacareer/stylelint-config": "9.0.0", + "stylelint": "16.7.0", + "stylelint-order": "6.0.4", + "stylelint-prettier": "5.0.0" } } diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index c8efef27c4..873cb1867b 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -38,7 +38,7 @@ "npm-run-all2": "6.2.0", "rimraf": "5.0.7", "shx": "0.3.4", - "stylelint": "15.11.0", + "stylelint": "16.7.0", "stylelint-config-spirit": "workspace:^", "typescript": "5.5.2", "vite": "5.3.2", diff --git a/packages/web/package.json b/packages/web/package.json index f138a4a1ce..f95568cde7 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -61,9 +61,11 @@ "@lmc-eu/spirit-common": "^0.3.5", "@lmc-eu/spirit-demo": "^0.1.3", "@rollup/plugin-typescript": "11.1.6", + "@types/eslint": "^9", "@types/jest": "29.5.12", "autoprefixer": "10.4.19", "clean-css-cli": "5.6.3", + "eslint": "8.57.0", "glob": "10.4.2", "jest": "29.7.0", "npm-run-all": "4.1.5", @@ -74,7 +76,7 @@ "sass": "1.77.6", "sass-true": "8.0.0", "shx": "0.3.4", - "stylelint": "15.11.0", + "stylelint": "16.7.0", "stylelint-config-spirit": "workspace:^", "tslib": "2.6.3", "typescript": "5.5.2" diff --git a/yarn.lock b/yarn.lock index 8164efba64..7d1a56dbbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,19 @@ __metadata: languageName: node linkType: hard +"@almacareer/stylelint-config@npm:9.0.0": + version: 9.0.0 + resolution: "@almacareer/stylelint-config@npm:9.0.0" + dependencies: + postcss-scss: "npm:^4.0.3" + stylelint-config-standard-scss: "npm:^13.0.0" + stylelint-order: "npm:^6.0.0" + peerDependencies: + stylelint: ^16.0.0 + checksum: 10/a7f39daa95b8dd0a995705de015600d3fa9f3df89faeab2d26878f4a8d98af3cd965eceb506a569a7b730c568507761f96474a6943f34014ddbf1e8603a227ff + languageName: node + linkType: hard + "@ampproject/remapping@npm:^2.2.0": version: 2.3.0 resolution: "@ampproject/remapping@npm:2.3.0" @@ -110,7 +123,19 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.24.4, @babel/generator@npm:^7.24.7, @babel/generator@npm:^7.24.8, @babel/generator@npm:^7.24.9, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.24.4, @babel/generator@npm:^7.24.7, @babel/generator@npm:^7.7.2": + version: 7.24.7 + resolution: "@babel/generator@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10/c71d24a4b41b19c10d2f2eb819f27d4cf94220e2322f7c8fed8bfbbb115b2bebbdd6dc1f27dac78a175e90604def58d763af87e0fa81ce4ab1582858162cf768 + languageName: node + linkType: hard + +"@babel/generator@npm:^7.24.8, @babel/generator@npm:^7.24.9": version: 7.24.10 resolution: "@babel/generator@npm:7.24.10" dependencies: @@ -273,7 +298,14 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.24.7 + resolution: "@babel/helper-plugin-utils@npm:7.24.7" + checksum: 10/dad51622f0123fdba4e2d40a81a6b7d6ef4b1491b2f92fd9749447a36bde809106cf117358705057a2adc8fd73d5dc090222e0561b1213dae8601c8367f5aac8 + languageName: node + linkType: hard + +"@babel/helper-plugin-utils@npm:^7.24.8": version: 7.24.8 resolution: "@babel/helper-plugin-utils@npm:7.24.8" checksum: 10/adbc9fc1142800a35a5eb0793296924ee8057fe35c61657774208670468a9fbfbb216f2d0bc46c680c5fefa785e5ff917cc1674b10bd75cdf9a6aa3444780630 @@ -342,6 +374,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-string-parser@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-string-parser@npm:7.24.7" + checksum: 10/603d8d962bbe89907aa99a8f19a006759ab7b2464615f20a6a22e3e2e8375af37ddd0e5175c9e622e1c4b2d83607ffb41055a59d0ce34404502af30fde573a5c + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.24.6, @babel/helper-validator-identifier@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-validator-identifier@npm:7.24.7" @@ -1707,7 +1746,18 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.18.9, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.18.9, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.24.7 + resolution: "@babel/types@npm:7.24.7" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/ad3c8c0d6fb4acb0bb74bb5b4bb849b181bf6185677ef9c59c18856c81e43628d0858253cf232f0eca806f02e08eff85a1d3e636a3e94daea737597796b0b430 + languageName: node + linkType: hard + +"@babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9": version: 7.24.9 resolution: "@babel/types@npm:7.24.9" dependencies: @@ -2029,7 +2079,7 @@ __metadata: languageName: node linkType: hard -"@csstools/css-parser-algorithms@npm:^2.3.1": +"@csstools/css-parser-algorithms@npm:^2.7.1": version: 2.7.1 resolution: "@csstools/css-parser-algorithms@npm:2.7.1" peerDependencies: @@ -2038,14 +2088,14 @@ __metadata: languageName: node linkType: hard -"@csstools/css-tokenizer@npm:^2.2.0": +"@csstools/css-tokenizer@npm:^2.4.1": version: 2.4.1 resolution: "@csstools/css-tokenizer@npm:2.4.1" checksum: 10/a368e5c96d3b11e147f95951e336105480acfa457cdbc6fdf97e8873ff92ab9ee6b4b6224ac1b263f08798802f6b29b8977a502d070f9ab695c9b9905b964198 languageName: node linkType: hard -"@csstools/media-query-list-parser@npm:^2.1.4": +"@csstools/media-query-list-parser@npm:^2.1.13": version: 2.1.13 resolution: "@csstools/media-query-list-parser@npm:2.1.13" peerDependencies: @@ -2062,7 +2112,7 @@ __metadata: languageName: node linkType: hard -"@csstools/selector-specificity@npm:^3.0.0": +"@csstools/selector-specificity@npm:^3.1.1": version: 3.1.1 resolution: "@csstools/selector-specificity@npm:3.1.1" peerDependencies: @@ -2099,6 +2149,13 @@ __metadata: languageName: node linkType: hard +"@dual-bundle/import-meta-resolve@npm:^4.1.0": + version: 4.1.0 + resolution: "@dual-bundle/import-meta-resolve@npm:4.1.0" + checksum: 10/a69d804a8e8e93732ac5525f85b9366ae78ec60fa02f0d5b4f2d625e18b355ba02502cdaef616ab1eac4450b966d2a398b59577a17483e4f8a350d062357bdf4 + languageName: node + linkType: hard + "@emnapi/core@npm:^1.1.0": version: 1.2.0 resolution: "@emnapi/core@npm:1.2.0" @@ -3690,7 +3747,7 @@ __metadata: npm-run-all2: "npm:6.2.0" rimraf: "npm:5.0.7" shx: "npm:0.3.4" - stylelint: "npm:15.11.0" + stylelint: "npm:16.7.0" stylelint-config-spirit: "workspace:^" typescript: "npm:5.5.2" vite: "npm:5.3.2" @@ -3871,9 +3928,11 @@ __metadata: "@lmc-eu/spirit-design-tokens": "npm:^2.0.3" "@lmc-eu/spirit-icons": "npm:^0.10.2" "@rollup/plugin-typescript": "npm:11.1.6" + "@types/eslint": "npm:^9" "@types/jest": "npm:29.5.12" autoprefixer: "npm:10.4.19" clean-css-cli: "npm:5.6.3" + eslint: "npm:8.57.0" glob: "npm:10.4.2" jest: "npm:29.7.0" npm-run-all: "npm:4.1.5" @@ -3884,7 +3943,7 @@ __metadata: sass: "npm:1.77.6" sass-true: "npm:8.0.0" shx: "npm:0.3.4" - stylelint: "npm:15.11.0" + stylelint: "npm:16.7.0" stylelint-config-spirit: "workspace:^" tslib: "npm:2.6.3" typescript: "npm:5.5.2" @@ -3896,19 +3955,6 @@ __metadata: languageName: unknown linkType: soft -"@lmc-eu/stylelint-config@npm:8.0.0": - version: 8.0.0 - resolution: "@lmc-eu/stylelint-config@npm:8.0.0" - dependencies: - postcss-scss: "npm:^4.0.3" - stylelint-config-standard-scss: "npm:^6.0.0" - stylelint-order: "npm:^6.0.0" - peerDependencies: - stylelint: ^15.11.0 - checksum: 10/0215cdf4a1784e136b75f597e16fe08040c76f4defada14b859d21d9075cf3111bb7ce113d1ed6d829d85883f3d840049fbeef6df18dec7f51689850c4e71662 - languageName: node - linkType: hard - "@lukeed/ms@npm:^2.0.1": version: 2.0.2 resolution: "@lukeed/ms@npm:2.0.2" @@ -7825,6 +7871,16 @@ __metadata: languageName: node linkType: hard +"@types/eslint@npm:^9": + version: 9.6.0 + resolution: "@types/eslint@npm:9.6.0" + dependencies: + "@types/estree": "npm:*" + "@types/json-schema": "npm:*" + checksum: 10/39fc797c671ec9c9184802b4974748cf45ee1b11d7aaaaede44426abcafd07ec7c18eb090e8f5b3387b51637ce3fdf54499472d8dd58a928f0d005cbacb573b4 + languageName: node + linkType: hard + "@types/estree@npm:*, @types/estree@npm:1.0.5, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.5": version: 1.0.5 resolution: "@types/estree@npm:1.0.5" @@ -8077,16 +8133,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*": - version: 20.14.11 - resolution: "@types/node@npm:20.14.11" - dependencies: - undici-types: "npm:~5.26.4" - checksum: 10/344e1ce1ed16c86ed1c4209ab4d1de67db83dd6b694a6fabe295c47144dde2c58dabddae9f39a0a2bdd246e95f8d141ccfe848e464884b48b8918df4f7788025 - languageName: node - linkType: hard - -"@types/node@npm:20.14.9": +"@types/node@npm:*, @types/node@npm:20.14.9": version: 20.14.9 resolution: "@types/node@npm:20.14.9" dependencies: @@ -10720,18 +10767,6 @@ __metadata: languageName: node linkType: hard -"camelcase-keys@npm:^7.0.0": - version: 7.0.2 - resolution: "camelcase-keys@npm:7.0.2" - dependencies: - camelcase: "npm:^6.3.0" - map-obj: "npm:^4.1.0" - quick-lru: "npm:^5.1.1" - type-fest: "npm:^1.2.1" - checksum: 10/6f92d969b7fa97456ffc35fe93f0a42d0d0a00fbd94bfc6cac07c84da86e6acfb89fdf04151460d47c583d2dd38a3e9406f980efe9a3d2e143cdfe46a7343083 - languageName: node - linkType: hard - "camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" @@ -10739,7 +10774,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.2.0, camelcase@npm:^6.3.0": +"camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d @@ -11839,6 +11874,23 @@ __metadata: languageName: node linkType: hard +"cosmiconfig@npm:^9.0.0": + version: 9.0.0 + resolution: "cosmiconfig@npm:9.0.0" + dependencies: + env-paths: "npm:^2.2.1" + import-fresh: "npm:^3.3.0" + js-yaml: "npm:^4.1.0" + parse-json: "npm:^5.2.0" + peerDependencies: + typescript: ">=4.9.5" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/8bdf1dfbb6fdb3755195b6886dc0649a3c742ec75afa4cb8da7b070936aed22a4f4e5b7359faafe03180358f311dbc300d248fd6586c458203d376a40cc77826 + languageName: node + linkType: hard + "cp-file@npm:^10.0.0": version: 10.0.0 resolution: "cp-file@npm:10.0.0" @@ -11993,7 +12045,7 @@ __metadata: languageName: node linkType: hard -"css-functions-list@npm:^3.2.1": +"css-functions-list@npm:^3.2.2": version: 3.2.2 resolution: "css-functions-list@npm:3.2.2" checksum: 10/b8a564118b93b87b63236a57132a3ef581416896a70c1d0df73360a9ec43dc582f7c2a586b578feb8476179518e557c6657570a8b6185b16300c7232a84d43e3 @@ -12362,6 +12414,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.5": + version: 4.3.6 + resolution: "debug@npm:4.3.6" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/d3adb9af7d57a9e809a68f404490cf776122acca16e6359a2702c0f462e510e91f9765c07f707b8ab0d91e03bad57328f3256f5082631cefb5393d0394d50fb7 + languageName: node + linkType: hard + "decache@npm:4.6.2": version: 4.6.2 resolution: "decache@npm:4.6.2" @@ -12388,13 +12452,6 @@ __metadata: languageName: node linkType: hard -"decamelize@npm:^5.0.0": - version: 5.0.1 - resolution: "decamelize@npm:5.0.1" - checksum: 10/643e88804c538a334fae303ae1da8b30193b81dad8689643b35e6ab8ab60a3b03492cab6096d8163bd41fd384d969485f0634c000f80af502aa7f4047258d5b4 - languageName: node - linkType: hard - "decimal.js@npm:^10.4.2, decimal.js@npm:^10.4.3": version: 10.4.3 resolution: "decimal.js@npm:10.4.3" @@ -13244,7 +13301,7 @@ __metadata: languageName: node linkType: hard -"env-paths@npm:^2.2.0": +"env-paths@npm:^2.2.0, env-paths@npm:^2.2.1": version: 2.2.1 resolution: "env-paths@npm:2.2.1" checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e @@ -14981,12 +15038,12 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^7.0.0": - version: 7.0.2 - resolution: "file-entry-cache@npm:7.0.2" +"file-entry-cache@npm:^9.0.0": + version: 9.0.0 + resolution: "file-entry-cache@npm:9.0.0" dependencies: - flat-cache: "npm:^3.2.0" - checksum: 10/e03e99beb9809a5679699ebd7146f3b93870b57775705f4b61bda4a1d8454dfd261b48e770a601f6c36a4789b4c0750f262e4d5fb2c7eeceb75e16439b07211a + flat-cache: "npm:^5.0.0" + checksum: 10/6b0ddc88e087e758fbc9c75e7f5f07982f02a8fc555c70561faff37ddce9f03e7273f62844beb5a0ee84685f6c62b036429227718687219a35fea57f3331f1aa languageName: node linkType: hard @@ -15217,7 +15274,7 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^3.0.4, flat-cache@npm:^3.2.0": +"flat-cache@npm:^3.0.4": version: 3.2.0 resolution: "flat-cache@npm:3.2.0" dependencies: @@ -15228,6 +15285,16 @@ __metadata: languageName: node linkType: hard +"flat-cache@npm:^5.0.0": + version: 5.0.0 + resolution: "flat-cache@npm:5.0.0" + dependencies: + flatted: "npm:^3.3.1" + keyv: "npm:^4.5.4" + checksum: 10/42570762052b17a1dec221d73a1e417d0ba07137de6debaabb51389cac265a12a027a895dc84e1725bc5cdde04fe8b706ad836860b05488e9a04bda9301d2529 + languageName: node + linkType: hard + "flat@npm:^5.0.2": version: 5.0.2 resolution: "flat@npm:5.0.2" @@ -15237,7 +15304,7 @@ __metadata: languageName: node linkType: hard -"flatted@npm:^3.2.9": +"flatted@npm:^3.2.9, flatted@npm:^3.3.1": version: 3.3.1 resolution: "flatted@npm:3.3.1" checksum: 10/7b8376061d5be6e0d3658bbab8bde587647f68797cf6bfeae9dea0e5137d9f27547ab92aaff3512dd9d1299086a6d61be98e9d48a56d17531b634f77faadbc49 @@ -16831,7 +16898,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.0.4, ignore@npm:^5.2.0, ignore@npm:^5.2.4": +"ignore@npm:^5.0.4, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1": version: 5.3.1 resolution: "ignore@npm:5.3.1" checksum: 10/0a884c2fbc8c316f0b9f92beaf84464253b73230a4d4d286697be45fca081199191ca33e1c2e82d9e5f851f5e9a48a78e25a35c951e7eb41e59f150db3530065 @@ -19026,7 +19093,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3": +"keyv@npm:^4.5.3, keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -19049,10 +19116,17 @@ __metadata: languageName: node linkType: hard -"known-css-properties@npm:^0.29.0": - version: 0.29.0 - resolution: "known-css-properties@npm:0.29.0" - checksum: 10/ab4e1d6bad10fe4ba15183e640dab8eec52aaa5a69899382de5843699f145e49c67e6a3ca5c8426ccd31577d3eec4459004ed317a550c3523b863a251280ddd4 +"known-css-properties@npm:^0.31.0": + version: 0.31.0 + resolution: "known-css-properties@npm:0.31.0" + checksum: 10/559679a98e58806c77c267aaaad56217a0d456e59d1f64e4d4ae5ee90319f888064f93e2acaed67b117badd723c22c1bec3cb38a07482c7de331b93fb2ba0c94 + languageName: node + linkType: hard + +"known-css-properties@npm:^0.34.0": + version: 0.34.0 + resolution: "known-css-properties@npm:0.34.0" + checksum: 10/0e93e83f84537e89b9dc56c16aff511ed9f24128fe509c3f601ce495eb10bf6678e2f4ff521f6b53feabc7bd18088e43efb31aae4cb771da831ef1408c23211a languageName: node linkType: hard @@ -20011,7 +20085,7 @@ __metadata: languageName: node linkType: hard -"map-obj@npm:^4.0.0, map-obj@npm:^4.1.0": +"map-obj@npm:^4.0.0": version: 4.3.0 resolution: "map-obj@npm:4.3.0" checksum: 10/fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e @@ -20153,23 +20227,10 @@ __metadata: languageName: node linkType: hard -"meow@npm:^10.1.5": - version: 10.1.5 - resolution: "meow@npm:10.1.5" - dependencies: - "@types/minimist": "npm:^1.2.2" - camelcase-keys: "npm:^7.0.0" - decamelize: "npm:^5.0.0" - decamelize-keys: "npm:^1.1.0" - hard-rejection: "npm:^2.1.0" - minimist-options: "npm:4.1.0" - normalize-package-data: "npm:^3.0.2" - read-pkg-up: "npm:^8.0.0" - redent: "npm:^4.0.0" - trim-newlines: "npm:^4.0.2" - type-fest: "npm:^1.2.2" - yargs-parser: "npm:^20.2.9" - checksum: 10/4d6d4c233b9405bace4fd6c60db0b5806d7186a047852ddce0748e56a57c75d4fef3ab2603a480bd74595e4e8e3a47b932d737397a62e043da1d3187f1240ff4 +"meow@npm:^13.2.0": + version: 13.2.0 + resolution: "meow@npm:13.2.0" + checksum: 10/4eff5bc921fed0b8a471ad79069d741a0210036d717547d0c7f36fdaf84ef7a3036225f38b6a53830d84dc9cbf8b944b097fde62381b8b5b215119e735ce1063 languageName: node linkType: hard @@ -22876,16 +22937,16 @@ __metadata: languageName: node linkType: hard -"postcss-safe-parser@npm:^6.0.0": - version: 6.0.0 - resolution: "postcss-safe-parser@npm:6.0.0" +"postcss-safe-parser@npm:^7.0.0": + version: 7.0.0 + resolution: "postcss-safe-parser@npm:7.0.0" peerDependencies: - postcss: ^8.3.3 - checksum: 10/06c733eaad83a3954367e7ee02ddfe3796e7a44d4299ccf9239f40964a4daac153c7d77613f32964b5a86c0c6c2f6167738f31d578b73b17cb69d0c4446f0ebe + postcss: ^8.4.31 + checksum: 10/dba4d782393e6f07339c24bdb8b41166e483d5e7b8f34174c35c64065aef36aadef94b53e0501d7a630d42f51bbd824671e8fb1c2b417333b08b71c9b0066c76 languageName: node linkType: hard -"postcss-scss@npm:^4.0.2, postcss-scss@npm:^4.0.3": +"postcss-scss@npm:^4.0.3, postcss-scss@npm:^4.0.9": version: 4.0.9 resolution: "postcss-scss@npm:4.0.9" peerDependencies: @@ -22894,13 +22955,13 @@ __metadata: languageName: node linkType: hard -"postcss-selector-parser@npm:^6.0.10, postcss-selector-parser@npm:^6.0.11, postcss-selector-parser@npm:^6.0.13, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4": - version: 6.1.1 - resolution: "postcss-selector-parser@npm:6.1.1" +"postcss-selector-parser@npm:^6.0.10, postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4, postcss-selector-parser@npm:^6.1.0": + version: 6.1.0 + resolution: "postcss-selector-parser@npm:6.1.0" dependencies: cssesc: "npm:^3.0.0" util-deprecate: "npm:^1.0.2" - checksum: 10/ce2af36b56d9333a6873498d3b6ee858466ceb3e9560f998eeaf294e5c11cafffb122d307f3c2904ee8f87d12c71c5ab0b26ca4228b97b6c70b7d1e7cd9b5737 + checksum: 10/2f9e5045b8bbe674fed3b79dbcd3daf21f5188cd7baf179beac513710ec3d75a8fc8184a262c3aec1c628ad3fd8bdb29c5d8530f1c9c5a61a18e1980bb000945 languageName: node linkType: hard @@ -22944,7 +23005,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.23, postcss@npm:^8.4.28, postcss@npm:^8.4.32, postcss@npm:^8.4.33, postcss@npm:^8.4.38, postcss@npm:^8.4.39": +"postcss@npm:^8.4.23, postcss@npm:^8.4.32, postcss@npm:^8.4.33, postcss@npm:^8.4.38": version: 8.4.39 resolution: "postcss@npm:8.4.39" dependencies: @@ -22955,6 +23016,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.4.39": + version: 8.4.41 + resolution: "postcss@npm:8.4.41" + dependencies: + nanoid: "npm:^3.3.7" + picocolors: "npm:^1.0.1" + source-map-js: "npm:^1.2.0" + checksum: 10/6e6176c2407eff60493ca60a706c6b7def20a722c3adda94ea1ece38345eb99964191336fd62b62652279cec6938e79e0b1e1d477142c8d3516e7a725a74ee37 + languageName: node + linkType: hard + "prebuild-install@npm:^7.1.1": version: 7.1.2 resolution: "prebuild-install@npm:7.1.2" @@ -23800,17 +23872,6 @@ __metadata: languageName: node linkType: hard -"read-pkg-up@npm:^8.0.0": - version: 8.0.0 - resolution: "read-pkg-up@npm:8.0.0" - dependencies: - find-up: "npm:^5.0.0" - read-pkg: "npm:^6.0.0" - type-fest: "npm:^1.0.1" - checksum: 10/fe4c80401656b40b408884457fffb5a8015c03b1018cfd8e48f8d82a5e9023e24963603aeb2755608d964593e046c15b34d29b07d35af9c7aa478be81805209c - languageName: node - linkType: hard - "read-pkg-up@npm:^9.1.0": version: 9.1.0 resolution: "read-pkg-up@npm:9.1.0" @@ -23845,18 +23906,6 @@ __metadata: languageName: node linkType: hard -"read-pkg@npm:^6.0.0": - version: 6.0.0 - resolution: "read-pkg@npm:6.0.0" - dependencies: - "@types/normalize-package-data": "npm:^2.4.0" - normalize-package-data: "npm:^3.0.2" - parse-json: "npm:^5.2.0" - type-fest: "npm:^1.0.1" - checksum: 10/0cebdff381128e923815c643074a87011070e5fc352bee575d327d6485da3317fab6d802a7b03deeb0be7be8d3ad1640397b3d5d2f044452caf4e8d1736bf94f - languageName: node - linkType: hard - "read-pkg@npm:^7.1.0": version: 7.1.0 resolution: "read-pkg@npm:7.1.0" @@ -24017,16 +24066,6 @@ __metadata: languageName: node linkType: hard -"redent@npm:^4.0.0": - version: 4.0.0 - resolution: "redent@npm:4.0.0" - dependencies: - indent-string: "npm:^5.0.0" - strip-indent: "npm:^4.0.0" - checksum: 10/6944e7b1d8f3fd28c2515f5c605b9f7f0ea0f4edddf41890bbbdd4d9ee35abb7540c3b278f03ff827bd278bb6ff4a5bd8692ca406b748c5c1c3ce7355e9fbf8f - languageName: node - linkType: hard - "reflect.getprototypeof@npm:^1.0.4": version: 1.0.6 resolution: "reflect.getprototypeof@npm:1.0.6" @@ -26115,13 +26154,6 @@ __metadata: languageName: node linkType: hard -"style-search@npm:^0.1.0": - version: 0.1.0 - resolution: "style-search@npm:0.1.0" - checksum: 10/841049768c863737389558fafffa0b765f553bde041b7997c4cd54606b64b0d139936e2efee74dc1ce59fcde78aaa88484d9894838c31d5c98c1ccace312a59b - languageName: node - linkType: hard - "style-to-js@npm:1.1.12": version: 1.1.12 resolution: "style-to-js@npm:1.1.12" @@ -26140,41 +26172,29 @@ __metadata: languageName: node linkType: hard -"stylelint-config-prettier@npm:9.0.5": - version: 9.0.5 - resolution: "stylelint-config-prettier@npm:9.0.5" - peerDependencies: - stylelint: ">= 11.x < 15" - bin: - stylelint-config-prettier: bin/check.js - stylelint-config-prettier-check: bin/check.js - checksum: 10/f00665801f65093269987eea0f6c0e1f4a479c76917da887577bf6063757575f5b752aa923d2677f87d32a14d528569ee0a869452dc41b0c3b61b5dcbec037f0 - languageName: node - linkType: hard - -"stylelint-config-recommended-scss@npm:^8.0.0": - version: 8.0.0 - resolution: "stylelint-config-recommended-scss@npm:8.0.0" +"stylelint-config-recommended-scss@npm:^14.0.0": + version: 14.0.0 + resolution: "stylelint-config-recommended-scss@npm:14.0.0" dependencies: - postcss-scss: "npm:^4.0.2" - stylelint-config-recommended: "npm:^9.0.0" - stylelint-scss: "npm:^4.0.0" + postcss-scss: "npm:^4.0.9" + stylelint-config-recommended: "npm:^14.0.0" + stylelint-scss: "npm:^6.0.0" peerDependencies: postcss: ^8.3.3 - stylelint: ^14.10.0 + stylelint: ^16.0.2 peerDependenciesMeta: postcss: optional: true - checksum: 10/9680c6709239229fbf988529b7fd2cb751feca29cecbcf1054ce136807c031e2e089b94aa4d193fc2dc60410774145e6800210ebb5f72af9c553c4fc4a26a0cd + checksum: 10/512fba4d81654b65a7a36d531f165c7d8f0c938e63a0f90daca0c21d623cc637e29195fec5e0ae1edd862502d69717f6f3e90016cd7ba8458e4a8afcd87bb3b4 languageName: node linkType: hard -"stylelint-config-recommended@npm:^9.0.0": - version: 9.0.0 - resolution: "stylelint-config-recommended@npm:9.0.0" +"stylelint-config-recommended@npm:^14.0.0, stylelint-config-recommended@npm:^14.0.1": + version: 14.0.1 + resolution: "stylelint-config-recommended@npm:14.0.1" peerDependencies: - stylelint: ^14.10.0 - checksum: 10/6d94582cb6ef0ba7d0181f0ff500fb12092e465915730d0a7f6b6e8d16e8c920658f18bb2c670115cd177f5d3b481609ff3a91bcee083d546ae31d94fdc03261 + stylelint: ^16.1.0 + checksum: 10/93c3fe920902abfd3f4130173876bb633230c910a3b293f5b74a0ea9c4427d197d7ade28dd62718246264f22f1e012899d0160a0176da723d14680d73876d701 languageName: node linkType: hard @@ -26182,39 +26202,39 @@ __metadata: version: 0.0.0-use.local resolution: "stylelint-config-spirit@workspace:configs/stylelint-config-spirit" dependencies: - "@lmc-eu/stylelint-config": "npm:8.0.0" - stylelint: "npm:15.11.0" - stylelint-config-prettier: "npm:9.0.5" + "@almacareer/stylelint-config": "npm:9.0.0" + stylelint: "npm:16.7.0" stylelint-order: "npm:6.0.4" + stylelint-prettier: "npm:5.0.0" peerDependencies: - stylelint: ^15.11.0 + stylelint: ^15.11.0 || ^16.0.0 languageName: unknown linkType: soft -"stylelint-config-standard-scss@npm:^6.0.0": - version: 6.1.0 - resolution: "stylelint-config-standard-scss@npm:6.1.0" +"stylelint-config-standard-scss@npm:^13.0.0": + version: 13.1.0 + resolution: "stylelint-config-standard-scss@npm:13.1.0" dependencies: - stylelint-config-recommended-scss: "npm:^8.0.0" - stylelint-config-standard: "npm:^29.0.0" + stylelint-config-recommended-scss: "npm:^14.0.0" + stylelint-config-standard: "npm:^36.0.0" peerDependencies: postcss: ^8.3.3 - stylelint: ^14.14.0 + stylelint: ^16.3.1 peerDependenciesMeta: postcss: optional: true - checksum: 10/eac8cc4e5f1b4ec8bba6a7bd84fe1010765f46357483bbe63f74c1ffdb01a2dd650d3751072b35869933facaacbf4adb0dcd7f141d01c5adbf72eaf720d54653 + checksum: 10/c5105e3b3390c9d0aa95e252abdf1850fa50d82e1a25a1fcc11a88b111038e00c8033a4b34905405f2203c84c0fa26ce1d40248df2172c83c76cc3baa552db07 languageName: node linkType: hard -"stylelint-config-standard@npm:^29.0.0": - version: 29.0.0 - resolution: "stylelint-config-standard@npm:29.0.0" +"stylelint-config-standard@npm:^36.0.0": + version: 36.0.1 + resolution: "stylelint-config-standard@npm:36.0.1" dependencies: - stylelint-config-recommended: "npm:^9.0.0" + stylelint-config-recommended: "npm:^14.0.1" peerDependencies: - stylelint: ^14.14.0 - checksum: 10/d2096702283950e55e059fcd78b49a97d1f70f83cc78ce05f96a836c405b2da68fad5cafd2c455b19dd9a30898459dd8661cbf3de1788993f4c5be14af56ca3b + stylelint: ^16.1.0 + checksum: 10/50b8fb396f1cb8cb3539aa97187eb8c2a4b2858c897374faa726837a809dae7c686cb5dc32528c9698745d4e97af1fe9035a04a5a8cb220bd6b1530795437013 languageName: node linkType: hard @@ -26230,67 +26250,79 @@ __metadata: languageName: node linkType: hard -"stylelint-scss@npm:^4.0.0": - version: 4.7.0 - resolution: "stylelint-scss@npm:4.7.0" +"stylelint-prettier@npm:5.0.0": + version: 5.0.0 + resolution: "stylelint-prettier@npm:5.0.0" dependencies: + prettier-linter-helpers: "npm:^1.0.0" + peerDependencies: + prettier: ">=3.0.0" + stylelint: ">=16.0.0" + checksum: 10/1d55f03bbc66c769643672789ebc6f48d6af573e8ef867ea919c7fd0fa70b9750183405641808c16a9a024f895092b23d0732d7ddda4c05ba6a21cceceee9205 + languageName: node + linkType: hard + +"stylelint-scss@npm:^6.0.0": + version: 6.3.2 + resolution: "stylelint-scss@npm:6.3.2" + dependencies: + known-css-properties: "npm:^0.31.0" postcss-media-query-parser: "npm:^0.2.3" postcss-resolve-nested-selector: "npm:^0.1.1" - postcss-selector-parser: "npm:^6.0.11" + postcss-selector-parser: "npm:^6.1.0" postcss-value-parser: "npm:^4.2.0" peerDependencies: - stylelint: ^14.5.1 || ^15.0.0 - checksum: 10/6a49f1f19339c812adc1fc89bb30d0a79ab1a88082f8d18b9403893f06e4f646131d9d4f2788a2fe2847fe38ff6cf505de8a3f6358665e022f91903c7453f4c4 + stylelint: ^16.0.2 + checksum: 10/c60f5b1538cc5589addbd86b94fd62e140a453008549c05902c87b8a72c854fdb4b966dd8fd17cf61fbcd665db40eb2109f086f1f4ba5399a07ff59500bdeac1 languageName: node linkType: hard -"stylelint@npm:15.11.0": - version: 15.11.0 - resolution: "stylelint@npm:15.11.0" +"stylelint@npm:16.7.0": + version: 16.7.0 + resolution: "stylelint@npm:16.7.0" dependencies: - "@csstools/css-parser-algorithms": "npm:^2.3.1" - "@csstools/css-tokenizer": "npm:^2.2.0" - "@csstools/media-query-list-parser": "npm:^2.1.4" - "@csstools/selector-specificity": "npm:^3.0.0" + "@csstools/css-parser-algorithms": "npm:^2.7.1" + "@csstools/css-tokenizer": "npm:^2.4.1" + "@csstools/media-query-list-parser": "npm:^2.1.13" + "@csstools/selector-specificity": "npm:^3.1.1" + "@dual-bundle/import-meta-resolve": "npm:^4.1.0" balanced-match: "npm:^2.0.0" colord: "npm:^2.9.3" - cosmiconfig: "npm:^8.2.0" - css-functions-list: "npm:^3.2.1" + cosmiconfig: "npm:^9.0.0" + css-functions-list: "npm:^3.2.2" css-tree: "npm:^2.3.1" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.1" + debug: "npm:^4.3.5" + fast-glob: "npm:^3.3.2" fastest-levenshtein: "npm:^1.0.16" - file-entry-cache: "npm:^7.0.0" + file-entry-cache: "npm:^9.0.0" global-modules: "npm:^2.0.0" globby: "npm:^11.1.0" globjoin: "npm:^0.1.4" html-tags: "npm:^3.3.1" - ignore: "npm:^5.2.4" - import-lazy: "npm:^4.0.0" + ignore: "npm:^5.3.1" imurmurhash: "npm:^0.1.4" is-plain-object: "npm:^5.0.0" - known-css-properties: "npm:^0.29.0" + known-css-properties: "npm:^0.34.0" mathml-tag-names: "npm:^2.1.3" - meow: "npm:^10.1.5" - micromatch: "npm:^4.0.5" + meow: "npm:^13.2.0" + micromatch: "npm:^4.0.7" normalize-path: "npm:^3.0.0" - picocolors: "npm:^1.0.0" - postcss: "npm:^8.4.28" + picocolors: "npm:^1.0.1" + postcss: "npm:^8.4.39" postcss-resolve-nested-selector: "npm:^0.1.1" - postcss-safe-parser: "npm:^6.0.0" - postcss-selector-parser: "npm:^6.0.13" + postcss-safe-parser: "npm:^7.0.0" + postcss-selector-parser: "npm:^6.1.0" postcss-value-parser: "npm:^4.2.0" resolve-from: "npm:^5.0.0" string-width: "npm:^4.2.3" - strip-ansi: "npm:^6.0.1" - style-search: "npm:^0.1.0" + strip-ansi: "npm:^7.1.0" supports-hyperlinks: "npm:^3.0.0" svg-tags: "npm:^1.0.0" - table: "npm:^6.8.1" + table: "npm:^6.8.2" write-file-atomic: "npm:^5.0.1" bin: stylelint: bin/stylelint.mjs - checksum: 10/34b9242b8a009642f8a9a50319c9a6c94b745a8605890df99830fc4d4847031e59719e68df12eed897fd486724fbfb1d240a8f267bb8b4440152a4dbfc3765f5 + checksum: 10/50e1c55670b02a8839e26c9d63b11820e0f1bcf108c76da17cde938bc9240377aa1622e5bfeb40e4590894d476c2e1fce6d7a6a90f3052c6ddd889797dbfd975 languageName: node linkType: hard @@ -26504,7 +26536,7 @@ __metadata: languageName: node linkType: hard -"table@npm:^6.8.1": +"table@npm:^6.8.2": version: 6.8.2 resolution: "table@npm:6.8.2" dependencies: @@ -27046,13 +27078,6 @@ __metadata: languageName: node linkType: hard -"trim-newlines@npm:^4.0.2": - version: 4.1.1 - resolution: "trim-newlines@npm:4.1.1" - checksum: 10/5b09f8e329e8f33c1111ef26906332ba7ba7248cde3e26fc054bb3d69f2858bf5feedca9559c572ff91f33e52977c28e0d41c387df6a02a633cbb8c2d8238627 - languageName: node - linkType: hard - "trim-repeated@npm:^2.0.0": version: 2.0.0 resolution: "trim-repeated@npm:2.0.0" @@ -27311,7 +27336,7 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^1.0.1, type-fest@npm:^1.0.2, type-fest@npm:^1.2.1, type-fest@npm:^1.2.2": +"type-fest@npm:^1.0.1, type-fest@npm:^1.0.2": version: 1.4.0 resolution: "type-fest@npm:1.4.0" checksum: 10/89875c247564601c2650bacad5ff80b859007fbdb6c9e43713ae3ffa3f584552eea60f33711dd762e16496a1ab4debd409822627be14097d9a17e39c49db591a @@ -28935,7 +28960,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3, yargs-parser@npm:^20.2.9": +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc From 4a62721601543b3bc6b0cb9b8a3dd2aba4ecdb41 Mon Sep 17 00:00:00 2001 From: literat Date: Thu, 4 Jul 2024 22:01:01 +0200 Subject: [PATCH 2/4] Refactor(stylelint-config): Switch to ESM syntax --- configs/stylelint-config-spirit/index.js | 11 ++++++----- configs/stylelint-config-spirit/package.json | 4 ++-- configs/stylelint-config-spirit/plugins/prettier.js | 2 +- configs/stylelint-config-spirit/rules/style.js | 2 +- configs/stylelint-config-spirit/rules/unstable.js | 2 +- yarn.lock | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/configs/stylelint-config-spirit/index.js b/configs/stylelint-config-spirit/index.js index 3731523d8b..0b9cd872c9 100644 --- a/configs/stylelint-config-spirit/index.js +++ b/configs/stylelint-config-spirit/index.js @@ -1,7 +1,8 @@ -const prettierPlugin = require('./plugins/prettier'); -const styleRules = require('./rules/style'); -const unstableRules = require('./rules/unstable'); +/* eslint-disable import/extensions -- Cannot find module error */ +import prettierPlugin from './plugins/prettier.js'; +import styleRules from './rules/style.js'; +import unstableRules from './rules/unstable.js'; -module.exports = { - extends: ['@lmc-eu/stylelint-config', prettierPlugin, styleRules, unstableRules], +export default { + extends: ['@almacareer/stylelint-config', prettierPlugin, styleRules, unstableRules], }; diff --git a/configs/stylelint-config-spirit/package.json b/configs/stylelint-config-spirit/package.json index ce09384bd1..dc00cb19f6 100644 --- a/configs/stylelint-config-spirit/package.json +++ b/configs/stylelint-config-spirit/package.json @@ -20,10 +20,10 @@ "url": "https://github.com/lmc-eu/spirit-design-system.git", "directory": "configs/stylelint-config-spirit" }, - "type": "commonjs", + "type": "module", "main": "./index.js", "peerDependencies": { - "stylelint": "^15.11.0 || ^16.0.0" + "stylelint": "^16.0.0" }, "dependencies": { "@almacareer/stylelint-config": "9.0.0", diff --git a/configs/stylelint-config-spirit/plugins/prettier.js b/configs/stylelint-config-spirit/plugins/prettier.js index 16c5d2fecb..9913171147 100644 --- a/configs/stylelint-config-spirit/plugins/prettier.js +++ b/configs/stylelint-config-spirit/plugins/prettier.js @@ -1,3 +1,3 @@ -module.exports = { +export default { extends: ['stylelint-config-prettier'], }; diff --git a/configs/stylelint-config-spirit/rules/style.js b/configs/stylelint-config-spirit/rules/style.js index 7c59365c62..26bcd6200b 100644 --- a/configs/stylelint-config-spirit/rules/style.js +++ b/configs/stylelint-config-spirit/rules/style.js @@ -1,6 +1,6 @@ const OFF = null; -module.exports = { +export default { rules: { // This rule can lead to less readable code // @see: https://github.com/stylelint/stylelint-config-recommended/issues/14 diff --git a/configs/stylelint-config-spirit/rules/unstable.js b/configs/stylelint-config-spirit/rules/unstable.js index 8a4e765c70..d7cf775971 100644 --- a/configs/stylelint-config-spirit/rules/unstable.js +++ b/configs/stylelint-config-spirit/rules/unstable.js @@ -1,4 +1,4 @@ -module.exports = { +export default { rules: { // Allow UNSTABLE_Component classnames // @see: https://github.com/lmc-eu/spirit-design-system/blob/main/docs/contributtion/experimental-code.md diff --git a/yarn.lock b/yarn.lock index 7d1a56dbbd..0823e9bf7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26207,7 +26207,7 @@ __metadata: stylelint-order: "npm:6.0.4" stylelint-prettier: "npm:5.0.0" peerDependencies: - stylelint: ^15.11.0 || ^16.0.0 + stylelint: ^16.0.0 languageName: unknown linkType: soft From 30e4cb00bc5672db0139a4b1ce7425492ad0ce9b Mon Sep 17 00:00:00 2001 From: literat Date: Thu, 4 Jul 2024 22:55:12 +0200 Subject: [PATCH 3/4] Refactor(stylelint-config): Switch from deprecated stylelint-config-prettier * to stylelint-prettier --- configs/stylelint-config-spirit/plugins/prettier.js | 5 ++++- configs/stylelint-config-spirit/rules/style.js | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configs/stylelint-config-spirit/plugins/prettier.js b/configs/stylelint-config-spirit/plugins/prettier.js index 9913171147..13205cf4a4 100644 --- a/configs/stylelint-config-spirit/plugins/prettier.js +++ b/configs/stylelint-config-spirit/plugins/prettier.js @@ -1,3 +1,6 @@ export default { - extends: ['stylelint-config-prettier'], + plugins: ['stylelint-prettier'], + rules: { + 'prettier/prettier': true, + }, }; diff --git a/configs/stylelint-config-spirit/rules/style.js b/configs/stylelint-config-spirit/rules/style.js index 26bcd6200b..60efcd499b 100644 --- a/configs/stylelint-config-spirit/rules/style.js +++ b/configs/stylelint-config-spirit/rules/style.js @@ -6,4 +6,12 @@ export default { // @see: https://github.com/stylelint/stylelint-config-recommended/issues/14 'declaration-block-no-redundant-longhand-properties': OFF, }, + overrides: [ + { + files: ['*.test.scss'], + rules: { + 'at-rule-empty-line-before': OFF, + }, + }, + ], }; From 2b75ba112ef41b06a3e0e49184949d5164bc5a74 Mon Sep 17 00:00:00 2001 From: literat Date: Thu, 4 Jul 2024 23:09:40 +0200 Subject: [PATCH 4/4] Style(web): Apply stylistic rules --- configs/stylelint-config-spirit/rules/style.js | 8 -------- .../web/src/scss/components/Alert/_Alert.scss | 1 - .../src/scss/components/Button/_Button.scss | 1 - .../web/src/scss/components/Grid/_Grid.scss | 1 - packages/web/src/scss/components/Tag/_Tag.scss | 2 -- .../UNSTABLE_Section/_UNSTABLE_Section.scss | 2 +- .../scss/tools/__tests__/_breakpoint.test.scss | 4 ++-- .../tools/__tests__/_form-fields.test.scss | 3 +++ .../src/scss/tools/__tests__/_list.test.scss | 2 -- .../scss/tools/__tests__/_placement.test.scss | 13 +++++++++++++ .../src/scss/tools/__tests__/_string.test.scss | 4 ---- .../scss/tools/__tests__/_typography.test.scss | 2 +- packages/web/src/scss/tools/_breakpoint.scss | 18 ++++++++++-------- packages/web/src/scss/tools/_dictionaries.scss | 12 ++++++++++-- packages/web/src/scss/tools/_list.scss | 4 ++-- 15 files changed, 42 insertions(+), 35 deletions(-) diff --git a/configs/stylelint-config-spirit/rules/style.js b/configs/stylelint-config-spirit/rules/style.js index 60efcd499b..26bcd6200b 100644 --- a/configs/stylelint-config-spirit/rules/style.js +++ b/configs/stylelint-config-spirit/rules/style.js @@ -6,12 +6,4 @@ export default { // @see: https://github.com/stylelint/stylelint-config-recommended/issues/14 'declaration-block-no-redundant-longhand-properties': OFF, }, - overrides: [ - { - files: ['*.test.scss'], - rules: { - 'at-rule-empty-line-before': OFF, - }, - }, - ], }; diff --git a/packages/web/src/scss/components/Alert/_Alert.scss b/packages/web/src/scss/components/Alert/_Alert.scss index d15509f6ba..77a93451af 100644 --- a/packages/web/src/scss/components/Alert/_Alert.scss +++ b/packages/web/src/scss/components/Alert/_Alert.scss @@ -25,7 +25,6 @@ } @include dictionaries.generate-colors('Alert', theme.$color-dictionary, theme.$color-dictionary-config); - @include dictionaries.generate-colors( 'Alert', theme.$color-dictionary, diff --git a/packages/web/src/scss/components/Button/_Button.scss b/packages/web/src/scss/components/Button/_Button.scss index fb97869a15..8d0c1f499b 100644 --- a/packages/web/src/scss/components/Button/_Button.scss +++ b/packages/web/src/scss/components/Button/_Button.scss @@ -44,7 +44,6 @@ $overrides: theme.$color-dictionary-overrides, $generate-data-attribute: true ); - @include dictionaries.generate-sizes('Button', theme.$sizes); .Button--block { diff --git a/packages/web/src/scss/components/Grid/_Grid.scss b/packages/web/src/scss/components/Grid/_Grid.scss index 87c5eb4f3f..78817865d9 100644 --- a/packages/web/src/scss/components/Grid/_Grid.scss +++ b/packages/web/src/scss/components/Grid/_Grid.scss @@ -25,5 +25,4 @@ } @include tools.equal-columns(theme.$grid-equal-columns, theme.$breakpoints); - @include tools.item(theme.$breakpoints); diff --git a/packages/web/src/scss/components/Tag/_Tag.scss b/packages/web/src/scss/components/Tag/_Tag.scss index c58bd11c7f..b183232b54 100644 --- a/packages/web/src/scss/components/Tag/_Tag.scss +++ b/packages/web/src/scss/components/Tag/_Tag.scss @@ -12,7 +12,6 @@ } @include dictionaries.generate-sizes('Tag', theme.$sizes); - @include dictionaries.generate-colors( 'Tag', theme.$color-dictionary, @@ -20,7 +19,6 @@ null, theme.$color-dictionary-overrides ); - @include dictionaries.generate-colors( 'Tag--subtle.Tag', theme.$color-dictionary, diff --git a/packages/web/src/scss/components/UNSTABLE_Section/_UNSTABLE_Section.scss b/packages/web/src/scss/components/UNSTABLE_Section/_UNSTABLE_Section.scss index e504ef89eb..4793eba7d7 100644 --- a/packages/web/src/scss/components/UNSTABLE_Section/_UNSTABLE_Section.scss +++ b/packages/web/src/scss/components/UNSTABLE_Section/_UNSTABLE_Section.scss @@ -2,7 +2,7 @@ margin-bottom: 2.5rem; } -@media (min-width: 768px) { +@media (width >= 768px) { .UNSTABLE_Section:not(:last-child) { margin-bottom: 4rem; } diff --git a/packages/web/src/scss/tools/__tests__/_breakpoint.test.scss b/packages/web/src/scss/tools/__tests__/_breakpoint.test.scss index 16f79f39a9..197358117a 100644 --- a/packages/web/src/scss/tools/__tests__/_breakpoint.test.scss +++ b/packages/web/src/scss/tools/__tests__/_breakpoint.test.scss @@ -13,7 +13,7 @@ } @include test.expect() { - @media (min-width: 600px) { + @media (width >= 600px) { .selector { color: #bada55; } @@ -53,7 +53,7 @@ } @include test.expect() { - @media (max-width: 599px) { + @media (width < 600px) { .selector { color: #bada55; } diff --git a/packages/web/src/scss/tools/__tests__/_form-fields.test.scss b/packages/web/src/scss/tools/__tests__/_form-fields.test.scss index d5b842ddd9..3ccf5f1d5d 100644 --- a/packages/web/src/scss/tools/__tests__/_form-fields.test.scss +++ b/packages/web/src/scss/tools/__tests__/_form-fields.test.scss @@ -11,6 +11,7 @@ @include form-fields.label-disabled(); } } + @include test.expect() { .label-disabled-test { color: form-fields-theme.$label-color-disabled; @@ -30,6 +31,7 @@ @include form-fields.input-disabled(); } } + @include test.expect() { .input-disabled-test { color: form-fields-theme.$input-color-disabled; @@ -46,6 +48,7 @@ @include form-fields.box-field-fluid(); } } + @include test.expect() { .box-field-fluid-test { width: 100%; diff --git a/packages/web/src/scss/tools/__tests__/_list.test.scss b/packages/web/src/scss/tools/__tests__/_list.test.scss index baa72e22c9..c002c6565b 100644 --- a/packages/web/src/scss/tools/__tests__/_list.test.scss +++ b/packages/web/src/scss/tools/__tests__/_list.test.scss @@ -4,9 +4,7 @@ @include test.describe('to-string function') { @include test.it('should convert a list to a string with the specified separator') { @include test.assert-equal(list.to-string((1, 2, 3), '-'), '1-2-3'); - @include test.assert-equal(list.to-string(('a', 'b', 'c'), '_'), 'a_b_c'); - @include test.assert-equal(list.to-string(('apple', 'banana', 'cherry')), 'apple banana cherry'); } } diff --git a/packages/web/src/scss/tools/__tests__/_placement.test.scss b/packages/web/src/scss/tools/__tests__/_placement.test.scss index 64b6294790..e4576c8bd1 100644 --- a/packages/web/src/scss/tools/__tests__/_placement.test.scss +++ b/packages/web/src/scss/tools/__tests__/_placement.test.scss @@ -8,6 +8,7 @@ --cross-axis-direction-left: #{placement.get-cross-axis-direction('left')}; --cross-axis-direction-bottom: #{placement.get-cross-axis-direction('bottom')}; } + @include test.expect() { --cross-axis-direction-left: vertical; --cross-axis-direction-bottom: horizontal; @@ -21,6 +22,7 @@ --is-logical-left: #{placement.is-logical('left')}; --is-logical-start: #{placement.is-logical('start')}; } + @include test.expect() { --is-logical-left: false; --is-logical-start: true; @@ -34,6 +36,7 @@ --logical-to-physical-start-horizontal: #{placement.translate-logical-to-physical('start', 'horizontal')}; --logical-to-physical-start-vertical: #{placement.translate-logical-to-physical('start', 'vertical')}; } + @include test.expect() { --logical-to-physical-start-horizontal: left; --logical-to-physical-start-vertical: top; @@ -61,6 +64,7 @@ $physical-direction: 'horizontal' )}; } + @include test.expect() { --transform-axis-left: left; --transform-axis-left-inverse: right; @@ -94,6 +98,7 @@ )}; --transform-left-top-spaces: #{placement.transform('left-top', $join-with: ' ')}; } + @include test.expect() { --transform-left: left; --transform-left-top: left-top; @@ -131,6 +136,7 @@ )}; --transform-top-start-spaces: #{placement.transform('top-start', $join-with: ' ')}; } + @include test.expect() { --transform-top-start: top-start; --transform-top-start-main-axis-inverse: bottom-start; @@ -150,6 +156,7 @@ @include placement.parent(); } } + @include test.expect() { .parent-test { position: relative; @@ -165,6 +172,7 @@ @include placement.child($z-index: 3); } } + @include test.expect() { .child-test { position: absolute; @@ -181,6 +189,7 @@ @include placement.child-controlled('test', 10px); } } + @include test.expect() { .child-controlled-test { --test-offset-orthogonal: 0; @@ -200,6 +209,7 @@ @include placement.child-variant($prefix: 'test', $placement: 'top', $offset: 10px); } } + @include test.expect() { .child-variant-test { --test-offset: 10px; @@ -222,6 +232,7 @@ ); } } + @include test.expect() { .child-variant-test { --test-offset: 10px; @@ -240,6 +251,7 @@ @include placement.arrow('test', '10px', '10px', '5px'); } } + @include test.expect() { .arrow-test { --test-arrow-width: 10px; @@ -260,6 +272,7 @@ @include placement.arrow-variant('test', 'top'); } } + @include test.expect() { .arrow-variant-test { inset: auto auto 100% 50%; diff --git a/packages/web/src/scss/tools/__tests__/_string.test.scss b/packages/web/src/scss/tools/__tests__/_string.test.scss index 2df164879f..52dee35549 100644 --- a/packages/web/src/scss/tools/__tests__/_string.test.scss +++ b/packages/web/src/scss/tools/__tests__/_string.test.scss @@ -4,7 +4,6 @@ @include test.describe('convert-kebab-case-to-camel-case function') { @include test.it('should convert kebab-case to camelCase') { @include test.assert-equal(string.convert-kebab-case-to-camel-case('top-start'), 'topStart'); - @include test.assert-equal( string.convert-kebab-case-to-camel-case('my-long-variable-name'), 'myLongVariableName' @@ -15,7 +14,6 @@ @include test.describe('convert-pascal-case-to-kebab-case function') { @include test.it('should convert PascalCase to kebab-case') { @include test.assert-equal(string.convert-pascal-case-to-kebab-case('TopStart'), 'top-start'); - @include test.assert-equal( string.convert-pascal-case-to-kebab-case('MyLongVariableName'), 'my-long-variable-name' @@ -26,9 +24,7 @@ @include test.describe('replace function') { @include test.it('should replace all occurrences of a substring with another string') { @include test.assert-equal(string.replace('top-start', '-', ''), 'topstart'); - @include test.assert-equal(string.replace('some-other-text', 'e', 'a'), 'soma-othar-taxt'); - @include test.assert-equal(string.replace('no-replacement-here', 'z', 'y'), 'no-replacement-here'); } } diff --git a/packages/web/src/scss/tools/__tests__/_typography.test.scss b/packages/web/src/scss/tools/__tests__/_typography.test.scss index 9acccbbe59..c45b87740a 100644 --- a/packages/web/src/scss/tools/__tests__/_typography.test.scss +++ b/packages/web/src/scss/tools/__tests__/_typography.test.scss @@ -27,7 +27,7 @@ } @include test.expect() { - @media (min-width: map.get(tokens.$breakpoints, 'tablet')) { + @media (width >= #{map.get(tokens.$breakpoints, 'tablet')}) { .typography-test { font-style: italic; font-weight: 700; diff --git a/packages/web/src/scss/tools/_breakpoint.scss b/packages/web/src/scss/tools/_breakpoint.scss index e84dee2c7a..3037385b98 100644 --- a/packages/web/src/scss/tools/_breakpoint.scss +++ b/packages/web/src/scss/tools/_breakpoint.scss @@ -1,13 +1,15 @@ -// Mixin to get the min-width media query for a breakpoint value. +@use 'sass:string'; + +// Mixin to get the width media query for a breakpoint value in up direction. // // Example: up(0) { … } will return … -// Example: up(768px) { … } will return @media (min-width: 768px) { … } +// Example: up(768px) { … } will return @media (width >= 768px) { … } // // Parameters are: // * $breakpoint-value: the breakpoint value (in pixels) @mixin up($breakpoint-value) { @if $breakpoint-value > 0 { - @media (min-width: $breakpoint-value) { + @media (width >= $breakpoint-value) { @content; } } @else { @@ -15,16 +17,16 @@ } } -// Mixin to get the max-width media query for a breakpoint value. +// Mixin to get the width media query for a breakpoint value in down direction. // // Example: down(0) { … } will return … -// Example: down(768px) { … } will return @media (max-width: 767px) { … } +// Example: down(768px) { … } will return @media (width < 768px) { … } // // Parameters are: // * $breakpoint-value: the breakpoint value (in pixels) @mixin down($breakpoint-value) { @if $breakpoint-value > 0 { - @media (max-width: ($breakpoint-value - 1px)) { + @media (width < $breakpoint-value) { @content; } } @else { @@ -45,10 +47,10 @@ @function get-modifier($modifier, $name, $breakpoint-value) { @if $breakpoint-value > 0 { @if $modifier == 'infix' { - @return unquote($name + '--'); + @return string.unquote($name + '--'); } - @return unquote('-' + $name); + @return string.unquote('-' + $name); } @return ''; diff --git a/packages/web/src/scss/tools/_dictionaries.scss b/packages/web/src/scss/tools/_dictionaries.scss index 6582e6a908..2687016692 100644 --- a/packages/web/src/scss/tools/_dictionaries.scss +++ b/packages/web/src/scss/tools/_dictionaries.scss @@ -1,5 +1,6 @@ @use 'sass:list'; @use 'sass:map'; +@use 'sass:meta'; @use 'sass:string'; @use '@tokens' as tokens; @use './links'; @@ -15,14 +16,17 @@ @if map.has-key(tokens.$action-colors, #{$variant}-default) { @return tokens.$action-colors; } + @if map.has-key(tokens.$emotion-colors, #{$variant}-default) { @return tokens.$emotion-colors; } + @if map.has-key(tokens.$text-colors, #{$variant}-default) { @return tokens.$text-colors; } @error 'Invalid color dictionary value as there is no #{$variant}-default token either in action-colors, emotion-colors, or text-colors tokens'; + @return null; } @@ -53,13 +57,16 @@ @return map.get($overrides, $dictionary-value, states, $state-name, $property-name); } } + @if map.has-key($overrides, $dictionary-value, $property-name) { @return map.get($overrides, $dictionary-value, $property-name); } } - @if type-of($property-value) == 'string' { + + @if meta.type-of($property-value) == 'string' { $tokens: -get-color-dictionary-tokens($dictionary-value); - @if type-of($tokens) == 'map' { + + @if meta.type-of($tokens) == 'map' { @return map.get($tokens, #{$dictionary-value}-#{$property-value}); } } @else { @@ -166,6 +173,7 @@ @each $dictionary-value in $dictionary-values { @each $print-value in $print-values { $variant-class: '#{$dictionary-value}'; + @if $print-value == 'disabled' { $variant-class: '#{$dictionary-value}.link-#{$print-value}'; } @else if $print-value != 'default' { diff --git a/packages/web/src/scss/tools/_list.scss b/packages/web/src/scss/tools/_list.scss index 87c292e942..7d0ba44f6d 100644 --- a/packages/web/src/scss/tools/_list.scss +++ b/packages/web/src/scss/tools/_list.scss @@ -5,10 +5,10 @@ @function to-string($list, $separator: ' ') { $string: ''; - @for $i from 1 through length($list) { + @for $i from 1 through list.length($list) { $string: $string + list.nth($list, $i); - @if $i < length($list) { + @if $i < list.length($list) { $string: $string + $separator; } }