From d649865283aff3545f9754a01c92982e37602dc8 Mon Sep 17 00:00:00 2001 From: Mikey Binns <38146638+mikeybinns@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:16:15 +0100 Subject: [PATCH] Scripts: Update stylelint dependency and the default config (#64828) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update stylelint deps to latest and convert deprecated rules to @stylistic * prevent extra rules being added * fix rule name change * fix scss overwrite bug * fix stylelint disables/enables * migrate stylistic styles to separate configs to make it easy to opt out for consumers * fix: switch stylistic config dep for plugin * use require.resolve for stylelint recommended config * fix stylelint unit tests * fix global mocks for node env * use correct configs for tests * add type checking for configs * convert tests to esm * remove unnecessary await * fix stylelint tests * remove experimental-vm-modules flag * revert jest globals changes * move utils to folder * update readme * update changelogs --------- Co-authored-by: Greg Ziółkowski Unlinked contributors: 75th, vicobot-0815. Co-authored-by: mikeybinns Co-authored-by: gziolo Co-authored-by: jacobcassidy Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: paulschreiber Co-authored-by: stein2nd --- .eslintrc.js | 6 + .stylelintrc.json | 6 +- package-lock.json | 1396 ++++++++++++----- packages/base-styles/_mixins.scss | 4 +- .../block-library/src/buttons/editor.scss | 4 +- packages/block-library/src/buttons/style.scss | 4 +- packages/scripts/CHANGELOG.md | 6 + packages/scripts/config/.stylelintrc.json | 2 +- packages/scripts/package.json | 2 +- packages/stylelint-config/CHANGELOG.md | 14 + packages/stylelint-config/README.md | 30 +- packages/stylelint-config/index.js | 70 +- packages/stylelint-config/package.json | 7 +- packages/stylelint-config/scss-stylistic.js | 16 + packages/stylelint-config/scss.js | 16 +- packages/stylelint-config/stylistic.js | 72 + .../stylelint-config/test/.stylelintignore | 1 + .../stylelint-config/test/.stylelintrc.json | 13 +- .../test/.stylelintrc.tests.json | 13 + .../test/__snapshots__/commenting.js.snap | 20 +- .../test/__snapshots__/functions.js.snap | 2 + .../test/__snapshots__/index.js.snap | 6 +- .../test/__snapshots__/media-queries.js.snap | 86 +- .../test/__snapshots__/properties.js.snap | 46 +- .../test/__snapshots__/scss.js.snap | 58 +- .../test/__snapshots__/selectors-scss.js.snap | 12 + .../test/__snapshots__/selectors.js.snap | 30 +- .../test/__snapshots__/structure.js.snap | 66 +- .../test/__snapshots__/values.js.snap | 28 +- packages/stylelint-config/test/commenting.js | 27 +- packages/stylelint-config/test/functions.js | 27 +- packages/stylelint-config/test/index.js | 27 +- .../test/media-queries-invalid.css | 2 +- .../stylelint-config/test/media-queries.js | 27 +- packages/stylelint-config/test/properties.js | 27 +- packages/stylelint-config/test/scss.js | 27 +- .../stylelint-config/test/selectors-scss.js | 27 +- packages/stylelint-config/test/selectors.js | 27 +- packages/stylelint-config/test/structure.js | 27 +- packages/stylelint-config/test/themes.js | 18 +- packages/stylelint-config/test/utils/index.js | 34 + packages/stylelint-config/test/values.js | 27 +- .../stylelint-config/test/vendor-prefixes.js | 18 +- 43 files changed, 1505 insertions(+), 873 deletions(-) create mode 100644 packages/stylelint-config/scss-stylistic.js create mode 100644 packages/stylelint-config/stylistic.js create mode 100644 packages/stylelint-config/test/.stylelintignore create mode 100644 packages/stylelint-config/test/.stylelintrc.tests.json create mode 100644 packages/stylelint-config/test/utils/index.js diff --git a/.eslintrc.js b/.eslintrc.js index caf01b7cbd71d..b5349d2de0a1f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -216,6 +216,12 @@ module.exports = { }, ], 'no-restricted-syntax': [ 'error', ...restrictedSyntax ], + 'jsdoc/check-tag-names': [ + 'error', + { + definedTags: [ 'jest-environment' ], + }, + ], }, overrides: [ { diff --git a/.stylelintrc.json b/.stylelintrc.json index 663befa2e4ce0..557376e02c406 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,5 +1,5 @@ { - "extends": "@wordpress/stylelint-config/scss", + "extends": "@wordpress/stylelint-config/scss-stylistic", "rules": { "at-rule-empty-line-before": null, "at-rule-no-unknown": null, @@ -21,7 +21,7 @@ } ], "font-weight-notation": null, - "max-line-length": null, + "@stylistic/max-line-length": null, "no-descending-specificity": null, "property-disallowed-list": [ [ "order" ], @@ -34,7 +34,7 @@ "value-keyword-case": null, "scss/operator-no-unspaced": null, "scss/selector-no-redundant-nesting-selector": null, - "scss/at-import-partial-extension": null, + "scss/load-partial-extension": null, "scss/no-global-function-names": null, "scss/comment-no-empty": null, "scss/at-extend-no-missing-placeholder": null, diff --git a/package-lock.json b/package-lock.json index c10f94d37dc8b..32819be602f72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4099,6 +4099,92 @@ "node": ">=0.1.90" } }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.1.tgz", + "integrity": "sha512-lSquqZCHxDfuTg/Sk2hiS0mcSFCEBuj49JfzPHJogDBT0mGCyY5A1AQzBWngitrp7i1/HAZpIgzF/VjhOEIJIg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.1" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.1.tgz", + "integrity": "sha512-UBqaiu7kU0lfvaP982/o3khfXccVlHPWp0/vwwiIgDF0GmqqqxoiXC/6FCjlS9u92f7CoEz6nXKQnrn1kIAkOw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/media-query-list-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1" + } + }, + "node_modules/@csstools/selector-specificity": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz", + "integrity": "sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^6.1.0" + } + }, "node_modules/@dabh/diagnostics": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", @@ -4119,6 +4205,16 @@ "node": ">=10.0.0" } }, + "node_modules/@dual-bundle/import-meta-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/@egjs/hammerjs": { "version": "2.0.17", "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", @@ -13364,6 +13460,34 @@ "url": "https://opencollective.com/storybook" } }, + "node_modules/@stylistic/stylelint-plugin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.0.1.tgz", + "integrity": "sha512-j3mH8HSw2Rob/KJFWZ627w3CQ8gQqVHtzCdPeEffUg5vOgpz4rgrR+Xw2kU0OQCDcdW8Y1nKfdXKKjM5Rn8X0g==", + "dev": true, + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.0", + "@csstools/css-tokenizer": "^3.0.0", + "@csstools/media-query-list-parser": "^3.0.0", + "is-plain-object": "^5.0.0", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", + "style-search": "^0.1.0", + "stylelint": "^16.8.2" + }, + "engines": { + "node": "^18.12 || >=20.9" + }, + "peerDependencies": { + "stylelint": "^16.8.0" + } + }, + "node_modules/@stylistic/stylelint-plugin/node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", @@ -21021,27 +21145,6 @@ "node": ">=0.10.0" } }, - "node_modules/clone-regexp": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz", - "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==", - "dev": true, - "dependencies": { - "is-regexp": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/clone-regexp/node_modules/is-regexp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", - "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/clone-response": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", @@ -22654,6 +22757,15 @@ "postcss": "^8.0.9" } }, + "node_modules/css-functions-list": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", + "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", + "dev": true, + "engines": { + "node": ">=12 || >=16" + } + }, "node_modules/css-loader": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.2.0.tgz", @@ -26049,18 +26161,6 @@ "node": ">= 8" } }, - "node_modules/execall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz", - "integrity": "sha512-0FU2hZ5Hh6iQnarpRtQurM/aAvp3RIbfvgLHrcqJYzhXyV2KFruhuChf9NC6waAhiUR7FFtlugkI4p7f2Fqlow==", - "dev": true, - "dependencies": { - "clone-regexp": "^2.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -26565,10 +26665,13 @@ } }, "node_modules/fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", - "dev": true + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } }, "node_modules/fastq": { "version": "1.6.0", @@ -27059,9 +27162,9 @@ } }, "node_modules/flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/flow-enums-runtime": { @@ -28993,12 +29096,15 @@ } }, "node_modules/html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", - "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/html-webpack-plugin": { @@ -29458,15 +29564,6 @@ "node": ">=4" } }, - "node_modules/import-lazy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", - "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -32390,9 +32487,9 @@ } }, "node_modules/keyv": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", - "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "dependencies": { "json-buffer": "3.0.1" @@ -32442,9 +32539,9 @@ } }, "node_modules/known-css-properties": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.24.0.tgz", - "integrity": "sha512-RTSoaUAfLvpR357vWzAz/50Q/BmHfmE6ETSWfutT0AJiw10e6CmcdYRQJlLRd95B53D0Y2aD1jSxD3V3ySF+PA==", + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz", + "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==", "dev": true }, "node_modules/kuler": { @@ -37968,12 +38065,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-selector": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", - "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", - "dev": true - }, "node_modules/normalize-url": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", @@ -40997,9 +41088,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -41822,31 +41913,67 @@ "dev": true }, "node_modules/postcss-resolve-nested-selector": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", - "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz", + "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==", "dev": true }, "node_modules/postcss-safe-parser": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", - "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.0.tgz", + "integrity": "sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-safe-parser" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "engines": { - "node": ">=12.0" + "node": ">=18.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-scss": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-scss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "engines": { + "node": ">=12.0" }, "peerDependencies": { - "postcss": "^8.3.3" + "postcss": "^8.4.29" } }, "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "dependencies": { "cssesc": "^3.0.0", @@ -47314,128 +47441,135 @@ } }, "node_modules/stylelint": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.2.0.tgz", - "integrity": "sha512-i0DrmDXFNpDsWiwx6SPRs4/pyw4kvZgqpDGvsTslQMY7hpUl6r33aQvNSn6cnTg2wtZ9rreFElI7XAKpOWi1vQ==", + "version": "16.8.2", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.8.2.tgz", + "integrity": "sha512-fInKATippQhcSm7AB+T32GpI+626yohrg33GkFT/5jzliUw5qhlwZq2UQQwgl3HsHrf09oeARi0ZwgY/UWEv9A==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "https://github.com/sponsors/stylelint" + } + ], "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.0", + "@csstools/css-tokenizer": "^3.0.0", + "@csstools/media-query-list-parser": "^3.0.0", + "@csstools/selector-specificity": "^4.0.0", + "@dual-bundle/import-meta-resolve": "^4.1.0", "balanced-match": "^2.0.0", - "colord": "^2.9.2", - "cosmiconfig": "^7.0.1", - "debug": "^4.3.3", - "execall": "^2.0.0", - "fast-glob": "^3.2.7", - "fastest-levenshtein": "^1.0.12", - "file-entry-cache": "^6.0.1", - "get-stdin": "^8.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^9.0.0", + "css-functions-list": "^3.2.2", + "css-tree": "^2.3.1", + "debug": "^4.3.6", + "fast-glob": "^3.3.2", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^9.0.0", "global-modules": "^2.0.0", - "globby": "^11.0.4", + "globby": "^11.1.0", "globjoin": "^0.1.4", - "html-tags": "^3.1.0", - "ignore": "^5.2.0", - "import-lazy": "^4.0.0", + "html-tags": "^3.3.1", + "ignore": "^5.3.2", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", - "known-css-properties": "^0.24.0", + "known-css-properties": "^0.34.0", "mathml-tag-names": "^2.1.3", - "meow": "^9.0.0", - "micromatch": "^4.0.4", + "meow": "^13.2.0", + "micromatch": "^4.0.7", "normalize-path": "^3.0.0", - "normalize-selector": "^0.2.0", - "picocolors": "^1.0.0", - "postcss": "^8.3.11", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.7", - "postcss-value-parser": "^4.1.0", + "picocolors": "^1.0.1", + "postcss": "^8.4.41", + "postcss-resolve-nested-selector": "^0.1.6", + "postcss-safe-parser": "^7.0.0", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", - "specificity": "^0.4.1", "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "style-search": "^0.1.0", + "strip-ansi": "^7.1.0", + "supports-hyperlinks": "^3.0.0", "svg-tags": "^1.0.0", - "table": "^6.7.5", - "v8-compile-cache": "^2.3.0", - "write-file-atomic": "^3.0.3" + "table": "^6.8.2", + "write-file-atomic": "^5.0.1" }, "bin": { - "stylelint": "bin/stylelint.js" + "stylelint": "bin/stylelint.mjs" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/stylelint" + "node": ">=18.12.0" } }, - "node_modules/stylelint-config-recommended": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-6.0.0.tgz", - "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==", - "dev": true, - "peerDependencies": { - "stylelint": "^14.0.0" - } + "node_modules/stylelint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, - "node_modules/stylelint-config-recommended-scss": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-5.0.2.tgz", - "integrity": "sha512-b14BSZjcwW0hqbzm9b0S/ScN2+3CO3O4vcMNOw2KGf8lfVSwJ4p5TbNEXKwKl1+0FMtgRXZj6DqVUe/7nGnuBg==", + "node_modules/stylelint/node_modules/balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "dev": true + }, + "node_modules/stylelint/node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "dependencies": { - "postcss-scss": "^4.0.2", - "stylelint-config-recommended": "^6.0.0", - "stylelint-scss": "^4.0.0" + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" }, - "peerDependencies": { - "stylelint": "^14.0.0" - } - }, - "node_modules/stylelint-config-recommended-scss/node_modules/postcss-scss": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.3.tgz", - "integrity": "sha512-j4KxzWovfdHsyxwl1BxkUal/O4uirvHgdzMKS1aWJBAV0qh2qj5qAZqpeBfVUYGWv+4iK9Az7SPyZ4fyNju1uA==", - "dev": true, "engines": { - "node": ">=12.0" + "node": ">=14" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" + "url": "https://github.com/sponsors/d-fischer" }, "peerDependencies": { - "postcss": "^8.3.3" + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/stylelint-scss": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.1.0.tgz", - "integrity": "sha512-BNYTo7MMamhFOlcaAWp2dMpjg6hPyM/FFqfDIYzmYVLMmQJqc8lWRIiTqP4UX5bresj9Vo0dKC6odSh43VP2NA==", + "node_modules/stylelint/node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", "dev": true, "dependencies": { - "lodash": "^4.17.21", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-selector-parser": "^6.0.6", - "postcss-value-parser": "^4.1.0" + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" }, - "peerDependencies": { - "stylelint": "^14.0.0" + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" } }, - "node_modules/stylelint-scss/node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/stylelint/node_modules/balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", - "dev": true + "node_modules/stylelint/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } }, "node_modules/stylelint/node_modules/emoji-regex": { "version": "8.0.0", @@ -47443,16 +47577,75 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/stylelint/node_modules/get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "node_modules/stylelint/node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, "engines": { - "node": ">=10" + "node": ">=8.6.0" + } + }, + "node_modules/stylelint/node_modules/file-entry-cache": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.0.0.tgz", + "integrity": "sha512-6MgEugi8p2tiUhqO7GnPsmbCCzj0YRCwwaTbpGRyKZesjRSzkqkAE9fPp7V2yMs5hwfgbQLgdvSSkGNg1s5Uvw==", + "dev": true, + "dependencies": { + "flat-cache": "^5.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=18" + } + }, + "node_modules/stylelint/node_modules/flat-cache": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", + "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", + "dev": true, + "dependencies": { + "flatted": "^3.3.1", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/stylelint/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/stylelint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/stylelint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "engines": { + "node": ">= 4" } }, "node_modules/stylelint/node_modules/is-fullwidth-code-point": { @@ -47464,45 +47657,68 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/meow": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", - "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "node_modules/stylelint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize": "^1.2.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" + "argparse": "^2.0.1" }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/stylelint/node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, + "node_modules/stylelint/node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/stylelint/node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "node_modules/stylelint/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/stylelint/node_modules/postcss": { + "version": "8.4.41", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", + "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" }, "engines": { - "node": ">=10" + "node": "^10 || ^12 || >=14" } }, "node_modules/stylelint/node_modules/postcss-value-parser": { @@ -47520,6 +47736,27 @@ "node": ">=8" } }, + "node_modules/stylelint/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/stylelint/node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/stylelint/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -47534,28 +47771,84 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "node_modules/stylelint/node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, "engines": { - "node": ">=10" + "node": ">=8" + } + }, + "node_modules/stylelint/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/stylelint/node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/stylelint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/stylelint/node_modules/supports-hyperlinks": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz", + "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/stylelint/node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/stylis": { @@ -47748,9 +48041,9 @@ } }, "node_modules/table": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", - "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", "dev": true, "dependencies": { "ajv": "^8.0.1", @@ -54833,7 +55126,7 @@ "sass-loader": "^12.1.0", "schema-utils": "^4.2.0", "source-map-loader": "^3.0.0", - "stylelint": "^14.2.0", + "stylelint": "^16.8.2", "terser-webpack-plugin": "^5.3.9", "url-loader": "^4.1.1", "webpack": "^5.88.2", @@ -55287,15 +55580,116 @@ "dev": true, "license": "MIT", "dependencies": { - "stylelint-config-recommended": "^6.0.0", - "stylelint-config-recommended-scss": "^5.0.2" + "@stylistic/stylelint-plugin": "^3.0.1", + "stylelint-config-recommended": "^14.0.1", + "stylelint-config-recommended-scss": "^14.1.0" }, "engines": { "node": ">=18.12.0", "npm": ">=8.19.2" }, "peerDependencies": { - "stylelint": "^14.2" + "stylelint": "^16.8.2" + } + }, + "packages/stylelint-config/node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "packages/stylelint-config/node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, + "packages/stylelint-config/node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "packages/stylelint-config/node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "packages/stylelint-config/node_modules/stylelint-config-recommended": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", + "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "https://github.com/sponsors/stylelint" + } + ], + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "stylelint": "^16.1.0" + } + }, + "packages/stylelint-config/node_modules/stylelint-config-recommended-scss": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz", + "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==", + "dev": true, + "dependencies": { + "postcss-scss": "^4.0.9", + "stylelint-config-recommended": "^14.0.1", + "stylelint-scss": "^6.4.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "postcss": "^8.3.3", + "stylelint": "^16.6.1" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + } + } + }, + "packages/stylelint-config/node_modules/stylelint-scss": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.5.1.tgz", + "integrity": "sha512-ZLqdqihm6uDYkrsOeD6YWb+stZI8Wn92kUNDhE4M+g9g1aCnRv0JlOrttFiAJJwaNzpdQgX3YJb5vDQXVuO9Ww==", + "dev": true, + "dependencies": { + "css-tree": "2.3.1", + "is-plain-object": "5.0.0", + "known-css-properties": "^0.34.0", + "postcss-media-query-parser": "^0.2.3", + "postcss-resolve-nested-selector": "^0.1.4", + "postcss-selector-parser": "^6.1.1", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "stylelint": "^16.0.2" } }, "packages/sync": { @@ -58171,6 +58565,30 @@ "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true }, + "@csstools/css-parser-algorithms": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.1.tgz", + "integrity": "sha512-lSquqZCHxDfuTg/Sk2hiS0mcSFCEBuj49JfzPHJogDBT0mGCyY5A1AQzBWngitrp7i1/HAZpIgzF/VjhOEIJIg==", + "dev": true + }, + "@csstools/css-tokenizer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.1.tgz", + "integrity": "sha512-UBqaiu7kU0lfvaP982/o3khfXccVlHPWp0/vwwiIgDF0GmqqqxoiXC/6FCjlS9u92f7CoEz6nXKQnrn1kIAkOw==", + "dev": true + }, + "@csstools/media-query-list-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "dev": true + }, + "@csstools/selector-specificity": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz", + "integrity": "sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==", + "dev": true + }, "@dabh/diagnostics": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", @@ -58188,6 +58606,12 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, + "@dual-bundle/import-meta-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==", + "dev": true + }, "@egjs/hammerjs": { "version": "2.0.17", "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", @@ -64755,6 +65179,30 @@ "file-system-cache": "2.3.0" } }, + "@stylistic/stylelint-plugin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.0.1.tgz", + "integrity": "sha512-j3mH8HSw2Rob/KJFWZ627w3CQ8gQqVHtzCdPeEffUg5vOgpz4rgrR+Xw2kU0OQCDcdW8Y1nKfdXKKjM5Rn8X0g==", + "dev": true, + "requires": { + "@csstools/css-parser-algorithms": "^3.0.0", + "@csstools/css-tokenizer": "^3.0.0", + "@csstools/media-query-list-parser": "^3.0.0", + "is-plain-object": "^5.0.0", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", + "style-search": "^0.1.0", + "stylelint": "^16.8.2" + }, + "dependencies": { + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + } + } + }, "@svgr/babel-plugin-add-jsx-attribute": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", @@ -69017,7 +69465,7 @@ "sass-loader": "^12.1.0", "schema-utils": "^4.2.0", "source-map-loader": "^3.0.0", - "stylelint": "^14.2.0", + "stylelint": "^16.8.2", "terser-webpack-plugin": "^5.3.9", "url-loader": "^4.1.1", "webpack": "^5.88.2", @@ -69331,8 +69779,71 @@ "@wordpress/stylelint-config": { "version": "file:packages/stylelint-config", "requires": { - "stylelint-config-recommended": "^6.0.0", - "stylelint-config-recommended-scss": "^5.0.2" + "@stylistic/stylelint-plugin": "^3.0.1", + "stylelint-config-recommended": "^14.0.1", + "stylelint-config-recommended-scss": "^14.1.0" + }, + "dependencies": { + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "requires": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + } + }, + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true + }, + "stylelint-config-recommended": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", + "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "dev": true + }, + "stylelint-config-recommended-scss": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz", + "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==", + "dev": true, + "requires": { + "postcss-scss": "^4.0.9", + "stylelint-config-recommended": "^14.0.1", + "stylelint-scss": "^6.4.0" + } + }, + "stylelint-scss": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.5.1.tgz", + "integrity": "sha512-ZLqdqihm6uDYkrsOeD6YWb+stZI8Wn92kUNDhE4M+g9g1aCnRv0JlOrttFiAJJwaNzpdQgX3YJb5vDQXVuO9Ww==", + "dev": true, + "requires": { + "css-tree": "2.3.1", + "is-plain-object": "5.0.0", + "known-css-properties": "^0.34.0", + "postcss-media-query-parser": "^0.2.3", + "postcss-resolve-nested-selector": "^0.1.4", + "postcss-selector-parser": "^6.1.1", + "postcss-value-parser": "^4.2.0" + } + } } }, "@wordpress/sync": { @@ -72328,23 +72839,6 @@ } } }, - "clone-regexp": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz", - "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==", - "dev": true, - "requires": { - "is-regexp": "^2.0.0" - }, - "dependencies": { - "is-regexp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", - "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==", - "dev": true - } - } - }, "clone-response": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", @@ -73621,6 +74115,12 @@ "integrity": "sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==", "dev": true }, + "css-functions-list": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.2.tgz", + "integrity": "sha512-c+N0v6wbKVxTu5gOBBFkr9BEdBWaqqjQeiJ8QvSRIJOf+UxlJh930m8e6/WNeODIK0mYLFkoONrnj16i2EcvfQ==", + "dev": true + }, "css-loader": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.2.0.tgz", @@ -76156,15 +76656,6 @@ } } }, - "execall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz", - "integrity": "sha512-0FU2hZ5Hh6iQnarpRtQurM/aAvp3RIbfvgLHrcqJYzhXyV2KFruhuChf9NC6waAhiUR7FFtlugkI4p7f2Fqlow==", - "dev": true, - "requires": { - "clone-regexp": "^2.1.0" - } - }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -76577,9 +77068,9 @@ } }, "fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true }, "fastq": { @@ -76968,9 +77459,9 @@ } }, "flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "flow-enums-runtime": { @@ -78434,9 +78925,9 @@ } }, "html-tags": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", - "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", "dev": true }, "html-webpack-plugin": { @@ -78758,12 +79249,6 @@ } } }, - "import-lazy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", - "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", - "dev": true - }, "import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -80917,9 +81402,9 @@ } }, "keyv": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", - "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "requires": { "json-buffer": "3.0.1" @@ -80957,9 +81442,9 @@ "dev": true }, "known-css-properties": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.24.0.tgz", - "integrity": "sha512-RTSoaUAfLvpR357vWzAz/50Q/BmHfmE6ETSWfutT0AJiw10e6CmcdYRQJlLRd95B53D0Y2aD1jSxD3V3ySF+PA==", + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz", + "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==", "dev": true }, "kuler": { @@ -85267,12 +85752,6 @@ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", "dev": true }, - "normalize-selector": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", - "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", - "dev": true - }, "normalize-url": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", @@ -87530,9 +88009,9 @@ "integrity": "sha512-SO+NP5argMoJVCWcYiOofPUeEWDIM47FNCBJtp6uJ8PpjtBcudYJTzCbCMit5dzmfSLCoijzEwIXOqPqD45xQg==" }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "picomatch": { "version": "2.3.1", @@ -88122,21 +88601,27 @@ } }, "postcss-resolve-nested-selector": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", - "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz", + "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==", "dev": true }, "postcss-safe-parser": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", - "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.0.tgz", + "integrity": "sha512-ovehqRNVCpuFzbXoTb4qLtyzK3xn3t/CUBxOs8LsnQjQrShaB4lKiHoVqY8ANaC0hBMHq5QVWk77rwGklFUDrg==", + "dev": true + }, + "postcss-scss": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", "dev": true }, "postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "requires": { "cssesc": "^3.0.0", @@ -92312,68 +92797,152 @@ } }, "stylelint": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.2.0.tgz", - "integrity": "sha512-i0DrmDXFNpDsWiwx6SPRs4/pyw4kvZgqpDGvsTslQMY7hpUl6r33aQvNSn6cnTg2wtZ9rreFElI7XAKpOWi1vQ==", + "version": "16.8.2", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.8.2.tgz", + "integrity": "sha512-fInKATippQhcSm7AB+T32GpI+626yohrg33GkFT/5jzliUw5qhlwZq2UQQwgl3HsHrf09oeARi0ZwgY/UWEv9A==", "dev": true, "requires": { + "@csstools/css-parser-algorithms": "^3.0.0", + "@csstools/css-tokenizer": "^3.0.0", + "@csstools/media-query-list-parser": "^3.0.0", + "@csstools/selector-specificity": "^4.0.0", + "@dual-bundle/import-meta-resolve": "^4.1.0", "balanced-match": "^2.0.0", - "colord": "^2.9.2", - "cosmiconfig": "^7.0.1", - "debug": "^4.3.3", - "execall": "^2.0.0", - "fast-glob": "^3.2.7", - "fastest-levenshtein": "^1.0.12", - "file-entry-cache": "^6.0.1", - "get-stdin": "^8.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^9.0.0", + "css-functions-list": "^3.2.2", + "css-tree": "^2.3.1", + "debug": "^4.3.6", + "fast-glob": "^3.3.2", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^9.0.0", "global-modules": "^2.0.0", - "globby": "^11.0.4", + "globby": "^11.1.0", "globjoin": "^0.1.4", - "html-tags": "^3.1.0", - "ignore": "^5.2.0", - "import-lazy": "^4.0.0", + "html-tags": "^3.3.1", + "ignore": "^5.3.2", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", - "known-css-properties": "^0.24.0", + "known-css-properties": "^0.34.0", "mathml-tag-names": "^2.1.3", - "meow": "^9.0.0", - "micromatch": "^4.0.4", + "meow": "^13.2.0", + "micromatch": "^4.0.7", "normalize-path": "^3.0.0", - "normalize-selector": "^0.2.0", - "picocolors": "^1.0.0", - "postcss": "^8.3.11", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.7", - "postcss-value-parser": "^4.1.0", + "picocolors": "^1.0.1", + "postcss": "^8.4.41", + "postcss-resolve-nested-selector": "^0.1.6", + "postcss-safe-parser": "^7.0.0", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", - "specificity": "^0.4.1", "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "style-search": "^0.1.0", + "strip-ansi": "^7.1.0", + "supports-hyperlinks": "^3.0.0", "svg-tags": "^1.0.0", - "table": "^6.7.5", - "v8-compile-cache": "^2.3.0", - "write-file-atomic": "^3.0.3" + "table": "^6.8.2", + "write-file-atomic": "^5.0.1" }, "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "balanced-match": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", "dev": true }, + "cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "requires": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + } + }, + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "requires": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + } + }, + "debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "get-stdin": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", - "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "file-entry-cache": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.0.0.tgz", + "integrity": "sha512-6MgEugi8p2tiUhqO7GnPsmbCCzj0YRCwwaTbpGRyKZesjRSzkqkAE9fPp7V2yMs5hwfgbQLgdvSSkGNg1s5Uvw==", + "dev": true, + "requires": { + "flat-cache": "^5.0.0" + } + }, + "flat-cache": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", + "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", + "dev": true, + "requires": { + "flatted": "^3.3.1", + "keyv": "^4.5.4" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true }, "is-fullwidth-code-point": { @@ -92382,36 +92951,42 @@ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "meow": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", - "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize": "^1.2.0", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" + "argparse": "^2.0.1" } }, - "normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, + "meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "postcss": { + "version": "8.4.41", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", + "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", "dev": true, "requires": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" + "nanoid": "^3.3.7", + "picocolors": "^1.0.1", + "source-map-js": "^1.2.0" } }, "postcss-value-parser": { @@ -92426,6 +93001,18 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true + }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -92435,74 +93022,67 @@ "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } } }, - "type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", - "dev": true + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + } + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz", + "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } }, "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "requires": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^4.0.1" } } } }, - "stylelint-config-recommended": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-6.0.0.tgz", - "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==", - "dev": true - }, - "stylelint-config-recommended-scss": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-5.0.2.tgz", - "integrity": "sha512-b14BSZjcwW0hqbzm9b0S/ScN2+3CO3O4vcMNOw2KGf8lfVSwJ4p5TbNEXKwKl1+0FMtgRXZj6DqVUe/7nGnuBg==", - "dev": true, - "requires": { - "postcss-scss": "^4.0.2", - "stylelint-config-recommended": "^6.0.0", - "stylelint-scss": "^4.0.0" - }, - "dependencies": { - "postcss-scss": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.3.tgz", - "integrity": "sha512-j4KxzWovfdHsyxwl1BxkUal/O4uirvHgdzMKS1aWJBAV0qh2qj5qAZqpeBfVUYGWv+4iK9Az7SPyZ4fyNju1uA==", - "dev": true - } - } - }, - "stylelint-scss": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.1.0.tgz", - "integrity": "sha512-BNYTo7MMamhFOlcaAWp2dMpjg6hPyM/FFqfDIYzmYVLMmQJqc8lWRIiTqP4UX5bresj9Vo0dKC6odSh43VP2NA==", - "dev": true, - "requires": { - "lodash": "^4.17.21", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-selector-parser": "^6.0.6", - "postcss-value-parser": "^4.1.0" - }, - "dependencies": { - "postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - } - } - }, "stylis": { "version": "4.0.13", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.13.tgz", @@ -92647,9 +93227,9 @@ } }, "table": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", - "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", "dev": true, "requires": { "ajv": "^8.0.1", diff --git a/packages/base-styles/_mixins.scss b/packages/base-styles/_mixins.scss index ebccbe0e5e8ae..91017c8bb9932 100644 --- a/packages/base-styles/_mixins.scss +++ b/packages/base-styles/_mixins.scss @@ -512,7 +512,7 @@ @mixin gradient-colors-deprecated() { // Our classes uses the same values we set for gradient value attributes. - /* stylelint-disable function-comma-space-after -- We can not use spacing because of WP multi site kses rule. */ + /* stylelint-disable @stylistic/function-comma-space-after -- We can not use spacing because of WP multi site kses rule. */ .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background { background: linear-gradient(135deg,rgba(0,208,132,1) 0%,rgba(6,147,227,1) 100%); } @@ -540,7 +540,7 @@ .has-midnight-gradient-background { background: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%); } - /* stylelint-enable function-comma-space-after */ + /* stylelint-enable @stylistic/function-comma-space-after */ } @mixin custom-scrollbars-on-hover($handle-color, $handle-color-hover) { diff --git a/packages/block-library/src/buttons/editor.scss b/packages/block-library/src/buttons/editor.scss index 1aa775fd1d648..f0a1e930d40bb 100644 --- a/packages/block-library/src/buttons/editor.scss +++ b/packages/block-library/src/buttons/editor.scss @@ -33,14 +33,14 @@ $blocks-block__margin: 0.5em; // // This back compat rule is ignored if the user decides to use the // newer justification options on the button block, hence the :not. - /* stylelint-disable indentation -- Disable the stylelint rule, otherwise this selector is ugly! */ + /* stylelint-disable @stylistic/indentation -- Disable the stylelint rule, otherwise this selector is ugly! */ &:not( .is-content-justification-space-between, .is-content-justification-right, .is-content-justification-left, .is-content-justification-center ) .wp-block[data-align="center"] { - /* stylelint-enable indentation */ + /* stylelint-enable @stylistic/indentation */ margin-left: auto; margin-right: auto; margin-top: 0; diff --git a/packages/block-library/src/buttons/style.scss b/packages/block-library/src/buttons/style.scss index 7e8bd61b03eaf..8492553bd50b8 100644 --- a/packages/block-library/src/buttons/style.scss +++ b/packages/block-library/src/buttons/style.scss @@ -55,14 +55,14 @@ $blocks-block__margin: 0.5em; // // This back compat rule is ignored if the user decides to use the // newer justification options on the button block, hence the :not. - /* stylelint-disable indentation -- Disable the stylelint rule, otherwise this selector is ugly! */ + /* stylelint-disable @stylistic/indentation -- Disable the stylelint rule, otherwise this selector is ugly! */ &:not( .is-content-justification-space-between, .is-content-justification-right, .is-content-justification-left, .is-content-justification-center ) .wp-block-button.aligncenter { - /* stylelint-enable indentation */ + /* stylelint-enable @stylistic/indentation */ margin-left: auto; margin-right: auto; width: 100%; diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index ea8a59d1ad2ad..43fe001351bc2 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased + +### Breaking Changes + +- Updated `stylelint` dependency to `^16.8.2` ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). +- Switched default config from `@wordpress/stylelint-config/scss` to use `@wordpress/stylelint-config/scss-stylistic` to keep stylistic rules ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). + ## 29.0.0 (2024-09-05) ### Breaking Changes diff --git a/packages/scripts/config/.stylelintrc.json b/packages/scripts/config/.stylelintrc.json index 1cfc8fc10ea56..96c4ccca74905 100644 --- a/packages/scripts/config/.stylelintrc.json +++ b/packages/scripts/config/.stylelintrc.json @@ -1,5 +1,5 @@ { - "extends": "@wordpress/stylelint-config/scss", + "extends": "@wordpress/stylelint-config/scss-stylistic", "rules": { "selector-class-pattern": null } diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 6661e9876683f..d9e74d0c71826 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -85,7 +85,7 @@ "sass-loader": "^12.1.0", "schema-utils": "^4.2.0", "source-map-loader": "^3.0.0", - "stylelint": "^14.2.0", + "stylelint": "^16.8.2", "terser-webpack-plugin": "^5.3.9", "url-loader": "^4.1.1", "webpack": "^5.88.2", diff --git a/packages/stylelint-config/CHANGELOG.md b/packages/stylelint-config/CHANGELOG.md index 9cb29690af289..4cc05e02105ff 100644 --- a/packages/stylelint-config/CHANGELOG.md +++ b/packages/stylelint-config/CHANGELOG.md @@ -2,6 +2,20 @@ ## Unreleased +### Breaking Changes + +- Updated `stylelint` peer dependency requirement to `^16.8.2` ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). +- Updated `stylelint-config-recommended` to `^14.0.1` and disabled new rules ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). +- Updated `stylelint-config-recommended-scss` to `^14.1.0` and disabled new rules ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). +- Added `@stylistic/stylelint-plugin` dependency at `^3.0.1` ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). +- Migrated stylelint's deprecated rules from v15 to use `@stylistic/stylelint-plugin` ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). For more information, see the [stylelint migration guide](https://stylelint.io/migration-guide/to-15). To migrate your rule overrides, you just need to add `@stylistic/` in front of the rule names. +- Created new `stylistic` and `scss-stylistic` configs ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). If you want to continue using the exact same rule set as before, you should use these, however if you currently use something like `stylelint-config-prettier` to disable formatting rules, you will want to use the non-stylistic configs (using the same names as before). +- `scss/at-import-partial-extension` has been renamed ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). You must convert this rule to `scss/load-partial-extension` instead (name only change). + +### Bug Fixes + +- Fixes `declaration-block-no-duplicate-properties` in the `scss` config to use the same value as the base config ([#64828](https://github.com/WordPress/gutenberg/pull/64828)). + ## 22.7.0 (2024-09-05) ## 22.6.0 (2024-08-21) diff --git a/packages/stylelint-config/README.md b/packages/stylelint-config/README.md index c6d69a9d18348..5d760dddc8f92 100644 --- a/packages/stylelint-config/README.md +++ b/packages/stylelint-config/README.md @@ -30,16 +30,38 @@ If you've globally installed `@wordpress/stylelint-config` using the `-g` flag, ## Presets -In addition to the default preset, there is also a SCSS preset. This preset extends both `@wordpress/stylelint-config` and [`stylelint-config-recommended-scss`](https://github.com/kristerkari/stylelint-config-recommended-scss). +In addition to the default preset, there is also a SCSS preset and 2 stylistic variant presets. ### SCSS +This preset extends both `@wordpress/stylelint-config` and [`stylelint-config-recommended-scss`](https://github.com/kristerkari/stylelint-config-recommended-scss). + ```json { "extends": [ "@wordpress/stylelint-config/scss" ] } ``` +### Stylistic + +This preset extends `@wordpress/stylelint-config` and adds stylistic rules such as `indentation`. + +```json +{ + "extends": [ "@wordpress/stylelint-config/stylistic" ] +} +``` + +### SCSS Stylistic + +This preset extends`@wordpress/stylelint-config`, `@wordpress/stylelint-config/stylistic` and `@wordpress/stylelint-config/scss`, and adapts some stylistic rules for SCSS. + +```json +{ + "extends": [ "@wordpress/stylelint-config/scss-stylistic" ] +} +``` + ## Extending the config Simply add a `"rules"` key to your config and add your overrides there. @@ -48,10 +70,10 @@ For example, to change the `indentation` to four spaces and turn off the `number ```json { - "extends": "@wordpress/stylelint-config", + "extends": "@wordpress/stylelint-config/stylistic", "rules": { - "indentation": 4, - "number-leading-zero": null + "@stylistic/indentation": 4, + "@stylistic/number-leading-zero": null } } ``` diff --git a/packages/stylelint-config/index.js b/packages/stylelint-config/index.js index 0ab4f954cb35b..3e5e00b05a2a4 100644 --- a/packages/stylelint-config/index.js +++ b/packages/stylelint-config/index.js @@ -1,7 +1,8 @@ 'use strict'; +/** @type {import('stylelint').Config} */ module.exports = { - extends: 'stylelint-config-recommended', + extends: [ 'stylelint-config-recommended' ].map( require.resolve ), rules: { 'at-rule-empty-line-before': [ 'always', @@ -10,15 +11,7 @@ module.exports = { ignore: [ 'after-comment' ], }, ], - 'at-rule-name-case': 'lower', - 'at-rule-name-space-after': 'always-single-line', 'at-rule-no-unknown': true, - 'at-rule-semicolon-newline-after': 'always', - 'block-closing-brace-newline-after': 'always', - 'block-closing-brace-newline-before': 'always', - 'block-opening-brace-newline-after': 'always', - 'block-opening-brace-space-before': 'always', - 'color-hex-case': 'lower', 'color-hex-length': 'short', 'color-named': 'never', 'comment-empty-line-before': [ @@ -27,20 +20,12 @@ module.exports = { ignore: [ 'stylelint-commands' ], }, ], - 'declaration-bang-space-after': 'never', - 'declaration-bang-space-before': 'always', 'declaration-block-no-duplicate-properties': [ true, { ignore: [ 'consecutive-duplicates' ], }, ], - 'declaration-block-semicolon-newline-after': 'always', - 'declaration-block-semicolon-space-before': 'never', - 'declaration-block-trailing-semicolon': 'always', - 'declaration-colon-newline-after': 'always-multi-line', - 'declaration-colon-space-after': 'always-single-line', - 'declaration-colon-space-before': 'never', 'declaration-property-unit-allowed-list': { 'line-height': [ 'px' ], }, @@ -51,51 +36,20 @@ module.exports = { ignore: [ 'relative' ], }, ], - 'function-comma-space-after': 'always', - 'function-comma-space-before': 'never', - 'function-max-empty-lines': 1, 'function-name-case': [ 'lower', { ignoreFunctions: [ '/^DXImageTransform.Microsoft.*$/' ], }, ], - 'function-parentheses-space-inside': 'never', 'function-url-quotes': 'never', - 'function-whitespace-after': 'always', - indentation: 'tab', 'length-zero-no-unit': true, - 'max-empty-lines': 2, - 'max-line-length': [ - 80, - { - ignore: 'non-comments', - ignorePattern: [ - '/(https?://[0-9,a-z]*.*)|(^description\\:.+)|(^tags\\:.+)/i', - ], - }, - ], - 'media-feature-colon-space-after': 'always', - 'media-feature-colon-space-before': 'never', - 'media-feature-range-operator-space-after': 'always', - 'media-feature-range-operator-space-before': 'always', - 'media-query-list-comma-newline-after': 'always-multi-line', - 'media-query-list-comma-space-after': 'always-single-line', - 'media-query-list-comma-space-before': 'never', - 'no-eol-whitespace': true, - 'no-missing-end-of-source-newline': true, - 'number-leading-zero': 'always', - 'number-no-trailing-zeros': true, - 'property-case': 'lower', 'rule-empty-line-before': [ 'always', { ignore: [ 'after-comment' ], }, ], - 'selector-attribute-brackets-space-inside': 'never', - 'selector-attribute-operator-space-after': 'never', - 'selector-attribute-operator-space-before': 'never', 'selector-attribute-quotes': 'always', 'selector-class-pattern': [ '^([a-z][a-z0-9]*)(-[a-z0-9]+)*$', @@ -111,21 +65,15 @@ module.exports = { 'Selector should use lowercase and separate words with hyphens (selector-id-pattern)', }, ], - 'selector-combinator-space-after': 'always', - 'selector-combinator-space-before': 'always', - 'selector-list-comma-newline-after': 'always', - 'selector-list-comma-space-before': 'never', - 'selector-max-empty-lines': 0, - 'selector-pseudo-class-case': 'lower', - 'selector-pseudo-class-parentheses-space-inside': 'never', - 'selector-pseudo-element-case': 'lower', 'selector-pseudo-element-colon-notation': 'double', 'selector-type-case': 'lower', - 'string-quotes': 'double', - 'unit-case': 'lower', 'value-keyword-case': 'lower', - 'value-list-comma-newline-after': 'always-multi-line', - 'value-list-comma-space-after': 'always-single-line', - 'value-list-comma-space-before': 'never', + + /* Disable new rules from stylelint-config-recommended 7 > 14 */ + 'function-no-unknown': null, + 'keyframe-block-no-duplicate-selectors': null, + 'annotation-no-unknown': null, + 'selector-anb-no-unmatchable': null, + 'media-query-no-invalid': null, }, }; diff --git a/packages/stylelint-config/package.json b/packages/stylelint-config/package.json index 19e6f19bfd2f8..53051078b9b86 100644 --- a/packages/stylelint-config/package.json +++ b/packages/stylelint-config/package.json @@ -32,11 +32,12 @@ ], "main": "index.js", "dependencies": { - "stylelint-config-recommended": "^6.0.0", - "stylelint-config-recommended-scss": "^5.0.2" + "@stylistic/stylelint-plugin": "^3.0.1", + "stylelint-config-recommended": "^14.0.1", + "stylelint-config-recommended-scss": "^14.1.0" }, "peerDependencies": { - "stylelint": "^14.2" + "stylelint": "^16.8.2" }, "npmpackagejsonlint": { "extends": "@wordpress/npm-package-json-lint-config", diff --git a/packages/stylelint-config/scss-stylistic.js b/packages/stylelint-config/scss-stylistic.js new file mode 100644 index 0000000000000..5d9bbb50c7b66 --- /dev/null +++ b/packages/stylelint-config/scss-stylistic.js @@ -0,0 +1,16 @@ +'use strict'; + +/** @type {import('stylelint').Config} */ +module.exports = { + extends: [ './stylistic', './scss' ].map( require.resolve ), + rules: { + '@stylistic/block-opening-brace-space-before': 'always', + '@stylistic/block-closing-brace-newline-after': [ + 'always', + { + ignoreAtRules: [ 'if', 'else' ], + }, + ], + '@stylistic/at-rule-name-space-after': 'always', + }, +}; diff --git a/packages/stylelint-config/scss.js b/packages/stylelint-config/scss.js index 09940642b218b..3f0aacce31d5a 100644 --- a/packages/stylelint-config/scss.js +++ b/packages/stylelint-config/scss.js @@ -1,5 +1,6 @@ 'use strict'; +/** @type {import('stylelint').Config} */ module.exports = { extends: [ './', 'stylelint-config-recommended-scss' ].map( require.resolve @@ -18,19 +19,18 @@ module.exports = { }, ], - 'block-opening-brace-space-before': 'always', - 'block-closing-brace-newline-after': [ - 'always', - { - ignoreAtRules: [ 'if', 'else' ], - }, - ], - 'at-rule-name-space-after': 'always', 'scss/at-else-closing-brace-newline-after': 'always-last-in-chain', 'scss/at-else-closing-brace-space-after': 'always-intermediate', 'scss/at-else-empty-line-before': 'never', 'scss/at-if-closing-brace-newline-after': 'always-last-in-chain', 'scss/at-if-closing-brace-space-after': 'always-intermediate', 'scss/selector-no-redundant-nesting-selector': true, + /* This value gets overwritten by stylelint-config-recommended-scss so we need to set it again. */ + 'declaration-block-no-duplicate-properties': [ + true, + { + ignore: [ 'consecutive-duplicates' ], + }, + ], }, }; diff --git a/packages/stylelint-config/stylistic.js b/packages/stylelint-config/stylistic.js new file mode 100644 index 0000000000000..54a1a2ca63dd7 --- /dev/null +++ b/packages/stylelint-config/stylistic.js @@ -0,0 +1,72 @@ +'use strict'; + +/** @type {import('stylelint').Config} */ +module.exports = { + extends: [ './' ].map( require.resolve ), + plugins: [ '@stylistic/stylelint-plugin' ], + rules: { + '@stylistic/at-rule-name-case': 'lower', + '@stylistic/at-rule-name-space-after': 'always-single-line', + '@stylistic/at-rule-semicolon-newline-after': 'always', + '@stylistic/block-closing-brace-newline-after': 'always', + '@stylistic/block-closing-brace-newline-before': 'always', + '@stylistic/block-opening-brace-newline-after': 'always', + '@stylistic/block-opening-brace-space-before': 'always', + '@stylistic/color-hex-case': 'lower', + '@stylistic/declaration-bang-space-after': 'never', + '@stylistic/declaration-bang-space-before': 'always', + '@stylistic/declaration-block-semicolon-newline-after': 'always', + '@stylistic/declaration-block-semicolon-space-before': 'never', + '@stylistic/declaration-block-trailing-semicolon': 'always', + '@stylistic/declaration-colon-newline-after': 'always-multi-line', + '@stylistic/declaration-colon-space-after': 'always-single-line', + '@stylistic/declaration-colon-space-before': 'never', + '@stylistic/function-comma-space-after': 'always', + '@stylistic/function-comma-space-before': 'never', + '@stylistic/function-max-empty-lines': 1, + '@stylistic/function-parentheses-space-inside': 'never', + '@stylistic/function-whitespace-after': 'always', + '@stylistic/indentation': 'tab', + '@stylistic/max-empty-lines': 2, + '@stylistic/max-line-length': [ + 80, + { + ignore: 'non-comments', + ignorePattern: [ + '/(https?://[0-9,a-z]*.*)|(^description\\:.+)|(^tags\\:.+)/i', + ], + }, + ], + '@stylistic/media-feature-colon-space-after': 'always', + '@stylistic/media-feature-colon-space-before': 'never', + '@stylistic/media-feature-range-operator-space-after': 'always', + '@stylistic/media-feature-range-operator-space-before': 'always', + '@stylistic/media-query-list-comma-newline-after': 'always-multi-line', + '@stylistic/media-query-list-comma-space-after': 'always-single-line', + '@stylistic/media-query-list-comma-space-before': 'never', + '@stylistic/no-eol-whitespace': true, + '@stylistic/no-missing-end-of-source-newline': true, + '@stylistic/number-leading-zero': 'always', + '@stylistic/number-no-trailing-zeros': true, + '@stylistic/property-case': 'lower', + '@stylistic/selector-attribute-brackets-space-inside': 'never', + '@stylistic/selector-attribute-operator-space-after': 'never', + '@stylistic/selector-attribute-operator-space-before': 'never', + '@stylistic/selector-combinator-space-after': 'always', + '@stylistic/selector-combinator-space-before': 'always', + '@stylistic/selector-list-comma-newline-after': 'always', + '@stylistic/selector-list-comma-space-before': 'never', + '@stylistic/selector-max-empty-lines': 0, + '@stylistic/selector-pseudo-class-case': 'lower', + '@stylistic/selector-pseudo-class-parentheses-space-inside': 'never', + '@stylistic/selector-pseudo-element-case': 'lower', + '@stylistic/string-quotes': 'double', + '@stylistic/unit-case': 'lower', + '@stylistic/value-list-comma-newline-after': 'always-multi-line', + '@stylistic/value-list-comma-space-after': 'always-single-line', + '@stylistic/value-list-comma-space-before': 'never', + + /* Add back deprecated rule from stylelint-config-recommended */ + '@stylistic/no-extra-semicolons': true, + }, +}; diff --git a/packages/stylelint-config/test/.stylelintignore b/packages/stylelint-config/test/.stylelintignore new file mode 100644 index 0000000000000..f74c877ecba44 --- /dev/null +++ b/packages/stylelint-config/test/.stylelintignore @@ -0,0 +1 @@ +# This file needs to exist so test files have a way to unignore the files in this folder. diff --git a/packages/stylelint-config/test/.stylelintrc.json b/packages/stylelint-config/test/.stylelintrc.json index 1ea6c83527d28..059284930a130 100644 --- a/packages/stylelint-config/test/.stylelintrc.json +++ b/packages/stylelint-config/test/.stylelintrc.json @@ -1,4 +1,13 @@ { - "extends": "@wordpress/stylelint-config/scss", - "ignoreFiles": [ "*-invalid.scss" ] + "extends": "./.stylelintrc.tests.json", + "overrides": [ + { + "files": [ "*.scss", "**/*.scss" ], + "ignoreFiles": [ "*-invalid.scss" ] + }, + { + "files": [ "*.css", "**/*.css" ], + "ignoreFiles": [ "*-invalid.css" ] + } + ] } diff --git a/packages/stylelint-config/test/.stylelintrc.tests.json b/packages/stylelint-config/test/.stylelintrc.tests.json new file mode 100644 index 0000000000000..c80288c8dc8bb --- /dev/null +++ b/packages/stylelint-config/test/.stylelintrc.tests.json @@ -0,0 +1,13 @@ +{ + "rules": {}, + "overrides": [ + { + "files": [ "*.scss", "**/*.scss" ], + "extends": "@wordpress/stylelint-config/scss-stylistic" + }, + { + "files": [ "*.css", "**/*.css" ], + "extends": "@wordpress/stylelint-config/stylistic" + } + ] +} diff --git a/packages/stylelint-config/test/__snapshots__/commenting.js.snap b/packages/stylelint-config/test/__snapshots__/commenting.js.snap index 4eaddcac0148c..ab191a80e1e73 100644 --- a/packages/stylelint-config/test/__snapshots__/commenting.js.snap +++ b/packages/stylelint-config/test/__snapshots__/commenting.js.snap @@ -2,8 +2,19 @@ exports[`flags warnings with invalid commenting css snapshot matches warnings 1`] = ` [ + { + "column": 131, + "endColumn": 132, + "endLine": 24, + "line": 24, + "rule": "@stylistic/max-line-length", + "severity": "error", + "text": "Expected line length to be no more than 80 characters (@stylistic/max-line-length)", + }, { "column": 1, + "endColumn": 3, + "endLine": 14, "line": 9, "rule": "comment-empty-line-before", "severity": "error", @@ -11,17 +22,12 @@ exports[`flags warnings with invalid commenting css snapshot matches warnings 1` }, { "column": 1, + "endColumn": 44, + "endLine": 18, "line": 18, "rule": "comment-empty-line-before", "severity": "error", "text": "Expected empty line before comment (comment-empty-line-before)", }, - { - "column": 131, - "line": 24, - "rule": "max-line-length", - "severity": "error", - "text": "Expected line length to be no more than 80 characters (max-line-length)", - }, ] `; diff --git a/packages/stylelint-config/test/__snapshots__/functions.js.snap b/packages/stylelint-config/test/__snapshots__/functions.js.snap index 2a559eaea3317..aa3ee40e69cc6 100644 --- a/packages/stylelint-config/test/__snapshots__/functions.js.snap +++ b/packages/stylelint-config/test/__snapshots__/functions.js.snap @@ -4,6 +4,8 @@ exports[`flags warnings with invalid functions css snapshot matches warnings 1`] [ { "column": 9, + "endColumn": 13, + "endLine": 4, "line": 4, "rule": "function-name-case", "severity": "error", diff --git a/packages/stylelint-config/test/__snapshots__/index.js.snap b/packages/stylelint-config/test/__snapshots__/index.js.snap index ec66034995164..10c35b02e0e93 100644 --- a/packages/stylelint-config/test/__snapshots__/index.js.snap +++ b/packages/stylelint-config/test/__snapshots__/index.js.snap @@ -4,10 +4,12 @@ exports[`flags warnings with invalid css snapshot matches warnings 1`] = ` [ { "column": 7, + "endColumn": 8, + "endLine": 2, "line": 2, - "rule": "number-leading-zero", + "rule": "@stylistic/number-leading-zero", "severity": "error", - "text": "Expected a leading zero (number-leading-zero)", + "text": "Expected a leading zero (@stylistic/number-leading-zero)", }, ] `; diff --git a/packages/stylelint-config/test/__snapshots__/media-queries.js.snap b/packages/stylelint-config/test/__snapshots__/media-queries.js.snap index 298e30bb24b9c..93bcf3c13d399 100644 --- a/packages/stylelint-config/test/__snapshots__/media-queries.js.snap +++ b/packages/stylelint-config/test/__snapshots__/media-queries.js.snap @@ -2,82 +2,104 @@ exports[`flags warnings with invalid media queries css snapshot matches warnings 1`] = ` [ - { - "column": 1, - "line": 31, - "rule": "at-rule-no-unknown", - "severity": "error", - "text": "Unexpected unknown at-rule "@mdia" (at-rule-no-unknown)", - }, { "column": 26, + "endColumn": 27, + "endLine": 1, "line": 1, - "rule": "media-feature-colon-space-after", + "rule": "@stylistic/media-feature-colon-space-after", "severity": "error", - "text": "Expected single space after ":" (media-feature-colon-space-after)", + "text": "Expected single space after ":" (@stylistic/media-feature-colon-space-after)", }, { "column": 27, + "endColumn": 28, + "endLine": 6, "line": 6, - "rule": "media-feature-colon-space-after", + "rule": "@stylistic/media-feature-colon-space-after", "severity": "error", - "text": "Expected single space after ":" (media-feature-colon-space-after)", + "text": "Expected single space after ":" (@stylistic/media-feature-colon-space-after)", }, { "column": 27, + "endColumn": 28, + "endLine": 6, "line": 6, - "rule": "media-feature-colon-space-before", - "severity": "error", - "text": "Unexpected whitespace before ":" (media-feature-colon-space-before)", - }, - { - "column": 17, - "line": 11, - "rule": "media-feature-name-no-unknown", + "rule": "@stylistic/media-feature-colon-space-before", "severity": "error", - "text": "Unexpected unknown media feature name "max-width 699px" (media-feature-name-no-unknown)", + "text": "Unexpected whitespace before ":" (@stylistic/media-feature-colon-space-before)", }, { "column": 28, + "endColumn": 29, + "endLine": 16, "line": 16, - "rule": "media-feature-range-operator-space-after", + "rule": "@stylistic/media-feature-range-operator-space-after", "severity": "error", - "text": "Expected single space after range operator (media-feature-range-operator-space-after)", + "text": "Expected single space after range operator (@stylistic/media-feature-range-operator-space-after)", }, { "column": 29, + "endColumn": 30, + "endLine": 21, "line": 21, - "rule": "media-feature-range-operator-space-after", + "rule": "@stylistic/media-feature-range-operator-space-after", "severity": "error", - "text": "Expected single space after range operator (media-feature-range-operator-space-after)", + "text": "Expected single space after range operator (@stylistic/media-feature-range-operator-space-after)", }, { "column": 25, + "endColumn": 26, + "endLine": 16, "line": 16, - "rule": "media-feature-range-operator-space-before", + "rule": "@stylistic/media-feature-range-operator-space-before", "severity": "error", - "text": "Expected single space before range operator (media-feature-range-operator-space-before)", + "text": "Expected single space before range operator (@stylistic/media-feature-range-operator-space-before)", }, { "column": 25, + "endColumn": 26, + "endLine": 26, "line": 26, - "rule": "media-feature-range-operator-space-before", + "rule": "@stylistic/media-feature-range-operator-space-before", "severity": "error", - "text": "Expected single space before range operator (media-feature-range-operator-space-before)", + "text": "Expected single space before range operator (@stylistic/media-feature-range-operator-space-before)", }, { "column": 27, + "endColumn": 28, + "endLine": 36, "line": 36, - "rule": "media-query-list-comma-space-before", + "rule": "@stylistic/media-query-list-comma-space-before", "severity": "error", - "text": "Unexpected whitespace before "," (media-query-list-comma-space-before)", + "text": "Unexpected whitespace before "," (@stylistic/media-query-list-comma-space-before)", }, { "column": 27, + "endColumn": 28, + "endLine": 40, "line": 40, - "rule": "media-query-list-comma-space-before", + "rule": "@stylistic/media-query-list-comma-space-before", + "severity": "error", + "text": "Unexpected whitespace before "," (@stylistic/media-query-list-comma-space-before)", + }, + { + "column": 1, + "endColumn": 6, + "endLine": 31, + "line": 31, + "rule": "at-rule-no-unknown", + "severity": "error", + "text": "Unexpected unknown at-rule "@mdia" (at-rule-no-unknown)", + }, + { + "column": 17, + "endColumn": 24, + "endLine": 11, + "line": 11, + "rule": "media-feature-name-no-unknown", "severity": "error", - "text": "Unexpected whitespace before "," (media-query-list-comma-space-before)", + "text": "Unexpected unknown media feature name "unknown" (media-feature-name-no-unknown)", }, ] `; diff --git a/packages/stylelint-config/test/__snapshots__/properties.js.snap b/packages/stylelint-config/test/__snapshots__/properties.js.snap index 9bb0ab2395484..a0c36aa885e1f 100644 --- a/packages/stylelint-config/test/__snapshots__/properties.js.snap +++ b/packages/stylelint-config/test/__snapshots__/properties.js.snap @@ -4,13 +4,35 @@ exports[`flags warnings with invalid properties css snapshot matches warnings 1` [ { "column": 13, + "endColumn": 14, + "endLine": 2, "line": 2, - "rule": "color-hex-case", + "rule": "@stylistic/color-hex-case", "severity": "error", - "text": "Expected "#FFFFFF" to be "#ffffff" (color-hex-case)", + "text": "Expected "#FFFFFF" to be "#ffffff" (@stylistic/color-hex-case)", }, { "column": 13, + "endColumn": 14, + "endLine": 2, + "line": 2, + "rule": "@stylistic/declaration-colon-space-after", + "severity": "error", + "text": "Expected single space after ":" with a single-line declaration (@stylistic/declaration-colon-space-after)", + }, + { + "column": 17, + "endColumn": 19, + "endLine": 4, + "line": 4, + "rule": "@stylistic/unit-case", + "severity": "error", + "text": "Expected "PX" to be "px" (@stylistic/unit-case)", + }, + { + "column": 13, + "endColumn": 20, + "endLine": 2, "line": 2, "rule": "color-hex-length", "severity": "error", @@ -18,34 +40,26 @@ exports[`flags warnings with invalid properties css snapshot matches warnings 1` }, { "column": 2, + "endColumn": 8, + "endLine": 5, "line": 5, "rule": "declaration-block-no-shorthand-property-overrides", "severity": "error", "text": "Unexpected shorthand "margin" after "margin-left" (declaration-block-no-shorthand-property-overrides)", }, - { - "column": 13, - "line": 2, - "rule": "declaration-colon-space-after", - "severity": "error", - "text": "Expected single space after ":" with a single-line declaration (declaration-colon-space-after)", - }, { "column": 2, + "endColumn": 7, + "endLine": 6, "line": 6, "rule": "property-no-unknown", "severity": "error", "text": "Unexpected unknown property "argin" (property-no-unknown)", }, - { - "column": 15, - "line": 4, - "rule": "unit-case", - "severity": "error", - "text": "Expected "PX" to be "px" (unit-case)", - }, { "column": 11, + "endColumn": 16, + "endLine": 3, "line": 3, "rule": "value-keyword-case", "severity": "error", diff --git a/packages/stylelint-config/test/__snapshots__/scss.js.snap b/packages/stylelint-config/test/__snapshots__/scss.js.snap index dd199336323ff..a1abeef86ac96 100644 --- a/packages/stylelint-config/test/__snapshots__/scss.js.snap +++ b/packages/stylelint-config/test/__snapshots__/scss.js.snap @@ -2,8 +2,37 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = ` [ + { + "column": 5, + "endColumn": 6, + "endLine": 14, + "line": 14, + "rule": "@stylistic/block-opening-brace-space-before", + "severity": "error", + "text": "Expected single space before "{" (@stylistic/block-opening-brace-space-before)", + }, + { + "column": 7, + "endColumn": 8, + "endLine": 31, + "line": 31, + "rule": "@stylistic/number-leading-zero", + "severity": "error", + "text": "Expected a leading zero (@stylistic/number-leading-zero)", + }, + { + "column": 15, + "endColumn": 16, + "endLine": 28, + "line": 28, + "rule": "@stylistic/no-extra-semicolons", + "severity": "error", + "text": "Unexpected extra semicolon (@stylistic/no-extra-semicolons)", + }, { "column": 1, + "endColumn": 6, + "endLine": 14, "line": 14, "rule": "scss/at-else-empty-line-before", "severity": "error", @@ -11,6 +40,8 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = ` }, { "column": 2, + "endColumn": 3, + "endLine": 12, "line": 12, "rule": "scss/at-if-closing-brace-newline-after", "severity": "error", @@ -18,6 +49,8 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = ` }, { "column": 2, + "endColumn": 3, + "endLine": 12, "line": 12, "rule": "scss/at-if-closing-brace-space-after", "severity": "error", @@ -25,6 +58,8 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = ` }, { "column": 1, + "endColumn": 9, + "endLine": 1, "line": 1, "rule": "scss/at-rule-no-unknown", "severity": "error", @@ -32,31 +67,12 @@ exports[`flags warnings with invalid scss snapshot matches warnings 1`] = ` }, { "column": 2, + "endColumn": 15, + "endLine": 22, "line": 22, "rule": "at-rule-empty-line-before", "severity": "error", "text": "Unexpected empty line before at-rule (at-rule-empty-line-before)", }, - { - "column": 5, - "line": 14, - "rule": "block-opening-brace-space-before", - "severity": "error", - "text": "Expected single space before "{" (block-opening-brace-space-before)", - }, - { - "column": 15, - "line": 28, - "rule": "no-extra-semicolons", - "severity": "error", - "text": "Unexpected extra semicolon (no-extra-semicolons)", - }, - { - "column": 7, - "line": 31, - "rule": "number-leading-zero", - "severity": "error", - "text": "Expected a leading zero (number-leading-zero)", - }, ] `; diff --git a/packages/stylelint-config/test/__snapshots__/selectors-scss.js.snap b/packages/stylelint-config/test/__snapshots__/selectors-scss.js.snap index 31cbf77098ec6..ea1746c538362 100644 --- a/packages/stylelint-config/test/__snapshots__/selectors-scss.js.snap +++ b/packages/stylelint-config/test/__snapshots__/selectors-scss.js.snap @@ -4,6 +4,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1` [ { "column": 2, + "endColumn": 3, + "endLine": 3, "line": 3, "rule": "scss/selector-no-redundant-nesting-selector", "severity": "error", @@ -11,6 +13,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1` }, { "column": 2, + "endColumn": 3, + "endLine": 10, "line": 10, "rule": "scss/selector-no-redundant-nesting-selector", "severity": "error", @@ -18,6 +22,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1` }, { "column": 2, + "endColumn": 3, + "endLine": 17, "line": 17, "rule": "scss/selector-no-redundant-nesting-selector", "severity": "error", @@ -25,6 +31,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1` }, { "column": 2, + "endColumn": 3, + "endLine": 24, "line": 24, "rule": "scss/selector-no-redundant-nesting-selector", "severity": "error", @@ -32,6 +40,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1` }, { "column": 2, + "endColumn": 3, + "endLine": 31, "line": 31, "rule": "scss/selector-no-redundant-nesting-selector", "severity": "error", @@ -39,6 +49,8 @@ exports[`flags warnings with invalid selectors scss snapshot matches warnings 1` }, { "column": 10, + "endColumn": 11, + "endLine": 31, "line": 31, "rule": "selector-pseudo-element-colon-notation", "severity": "error", diff --git a/packages/stylelint-config/test/__snapshots__/selectors.js.snap b/packages/stylelint-config/test/__snapshots__/selectors.js.snap index 42242da99d451..f39edbfdb3fa5 100644 --- a/packages/stylelint-config/test/__snapshots__/selectors.js.snap +++ b/packages/stylelint-config/test/__snapshots__/selectors.js.snap @@ -2,8 +2,19 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`] = ` [ + { + "column": 12, + "endColumn": 13, + "endLine": 17, + "line": 17, + "rule": "@stylistic/string-quotes", + "severity": "error", + "text": "Expected double quotes (@stylistic/string-quotes)", + }, { "column": 15, + "endColumn": 19, + "endLine": 18, "line": 18, "rule": "declaration-property-unit-allowed-list", "severity": "error", @@ -11,6 +22,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`] }, { "column": 1, + "endColumn": 11, + "endLine": 25, "line": 25, "rule": "selector-class-pattern", "severity": "error", @@ -18,6 +31,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`] }, { "column": 1, + "endColumn": 13, + "endLine": 1, "line": 1, "rule": "selector-id-pattern", "severity": "error", @@ -25,6 +40,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`] }, { "column": 1, + "endColumn": 14, + "endLine": 5, "line": 5, "rule": "selector-id-pattern", "severity": "error", @@ -32,6 +49,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`] }, { "column": 4, + "endColumn": 17, + "endLine": 9, "line": 9, "rule": "selector-id-pattern", "severity": "error", @@ -39,6 +58,8 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`] }, { "column": 1, + "endColumn": 10, + "endLine": 21, "line": 21, "rule": "selector-id-pattern", "severity": "error", @@ -46,17 +67,12 @@ exports[`flags warnings with invalid selectors css snapshot matches warnings 1`] }, { "column": 10, + "endColumn": 11, + "endLine": 29, "line": 29, "rule": "selector-pseudo-element-colon-notation", "severity": "error", "text": "Expected double colon pseudo-element notation (selector-pseudo-element-colon-notation)", }, - { - "column": 12, - "line": 17, - "rule": "string-quotes", - "severity": "error", - "text": "Expected double quotes (string-quotes)", - }, ] `; diff --git a/packages/stylelint-config/test/__snapshots__/structure.js.snap b/packages/stylelint-config/test/__snapshots__/structure.js.snap index b41ef9131547f..c59cfb0fc2918 100644 --- a/packages/stylelint-config/test/__snapshots__/structure.js.snap +++ b/packages/stylelint-config/test/__snapshots__/structure.js.snap @@ -4,59 +4,75 @@ exports[`flags warnings with invalid structure css snapshot matches warnings 1`] [ { "column": 45, + "endColumn": 46, + "endLine": 7, "line": 7, - "rule": "block-closing-brace-newline-before", + "rule": "@stylistic/block-closing-brace-newline-before", "severity": "error", - "text": "Expected newline before "}" (block-closing-brace-newline-before)", + "text": "Expected newline before "}" (@stylistic/block-closing-brace-newline-before)", }, { "column": 14, + "endColumn": 15, + "endLine": 7, "line": 7, - "rule": "block-opening-brace-newline-after", + "rule": "@stylistic/block-opening-brace-newline-after", "severity": "error", - "text": "Expected newline after "{" (block-opening-brace-newline-after)", + "text": "Expected newline after "{" (@stylistic/block-opening-brace-newline-after)", }, { "column": 32, + "endColumn": 33, + "endLine": 7, "line": 7, - "rule": "declaration-block-semicolon-newline-after", + "rule": "@stylistic/declaration-block-semicolon-newline-after", "severity": "error", - "text": "Expected newline after ";" (declaration-block-semicolon-newline-after)", + "text": "Expected newline after ";" (@stylistic/declaration-block-semicolon-newline-after)", }, { - "column": 12, - "line": 1, - "rule": "selector-list-comma-newline-after", + "column": 3, + "endColumn": 4, + "endLine": 4, + "line": 4, + "rule": "@stylistic/indentation", "severity": "error", - "text": "Expected newline after "," (selector-list-comma-newline-after)", + "text": "Expected indentation of 0 tabs (@stylistic/indentation)", }, { - "column": 25, - "line": 1, - "rule": "selector-list-comma-newline-after", + "column": 3, + "endColumn": 20, + "endLine": 2, + "line": 2, + "rule": "@stylistic/indentation", "severity": "error", - "text": "Expected newline after "," (selector-list-comma-newline-after)", + "text": "Expected indentation of 1 tab (@stylistic/indentation)", }, { "column": 3, - "line": 4, - "rule": "indentation", + "endColumn": 15, + "endLine": 3, + "line": 3, + "rule": "@stylistic/indentation", "severity": "error", - "text": "Expected indentation of 0 tabs (indentation)", + "text": "Expected indentation of 1 tab (@stylistic/indentation)", }, { - "column": 3, - "line": 2, - "rule": "indentation", + "column": 12, + "endColumn": 13, + "endLine": 1, + "line": 1, + "rule": "@stylistic/selector-list-comma-newline-after", "severity": "error", - "text": "Expected indentation of 1 tab (indentation)", + "text": "Expected newline after "," (@stylistic/selector-list-comma-newline-after)", }, { - "column": 3, - "line": 3, - "rule": "indentation", + "column": 25, + "endColumn": 26, + "endLine": 1, + "line": 1, + "rule": "@stylistic/selector-list-comma-newline-after", "severity": "error", - "text": "Expected indentation of 1 tab (indentation)", + "text": "Expected newline after "," (@stylistic/selector-list-comma-newline-after)", }, ] `; diff --git a/packages/stylelint-config/test/__snapshots__/values.js.snap b/packages/stylelint-config/test/__snapshots__/values.js.snap index 2331e0364e5c7..95c34fcbfc8d4 100644 --- a/packages/stylelint-config/test/__snapshots__/values.js.snap +++ b/packages/stylelint-config/test/__snapshots__/values.js.snap @@ -4,20 +4,26 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] = [ { "column": 16, + "endColumn": 17, + "endLine": 2, "line": 2, - "rule": "declaration-block-trailing-semicolon", + "rule": "@stylistic/declaration-block-trailing-semicolon", "severity": "error", - "text": "Expected a trailing semicolon (declaration-block-trailing-semicolon)", + "text": "Expected a trailing semicolon (@stylistic/declaration-block-trailing-semicolon)", }, { "column": 13, + "endColumn": 14, + "endLine": 2, "line": 2, - "rule": "declaration-colon-space-after", + "rule": "@stylistic/declaration-colon-space-after", "severity": "error", - "text": "Expected single space after ":" with a single-line declaration (declaration-colon-space-after)", + "text": "Expected single space after ":" with a single-line declaration (@stylistic/declaration-colon-space-after)", }, { "column": 15, + "endColumn": 20, + "endLine": 12, "line": 12, "rule": "declaration-property-unit-allowed-list", "severity": "error", @@ -25,6 +31,8 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] = }, { "column": 15, + "endColumn": 30, + "endLine": 10, "line": 10, "rule": "font-family-name-quotes", "severity": "error", @@ -32,13 +40,17 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] = }, { "column": 15, + "endColumn": 19, + "endLine": 11, "line": 11, "rule": "font-weight-notation", "severity": "error", - "text": "Expected numeric font-weight notation (font-weight-notation)", + "text": "Expected "bold" to be "700" (font-weight-notation)", }, { "column": 11, + "endColumn": 13, + "endLine": 6, "line": 6, "rule": "length-zero-no-unit", "severity": "error", @@ -46,6 +58,8 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] = }, { "column": 15, + "endColumn": 17, + "endLine": 6, "line": 6, "rule": "length-zero-no-unit", "severity": "error", @@ -53,6 +67,8 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] = }, { "column": 24, + "endColumn": 26, + "endLine": 6, "line": 6, "rule": "length-zero-no-unit", "severity": "error", @@ -60,6 +76,8 @@ exports[`flags warnings with invalid values css snapshot matches warnings 1`] = }, { "column": 1, + "endColumn": 10, + "endLine": 15, "line": 15, "rule": "no-duplicate-selectors", "severity": "error", diff --git a/packages/stylelint-config/test/commenting.js b/packages/stylelint-config/test/commenting.js index 1a23a47434fc1..dde02f605faf1 100644 --- a/packages/stylelint-config/test/commenting.js +++ b/packages/stylelint-config/test/commenting.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/commenting-valid.css', - 'utf-8' - ), - invalidCss = fs.readFileSync( - './packages/stylelint-config/test/commenting-invalid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid commenting css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './commenting-valid.css' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid commenting css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidCss, - config, - } ); + result = getStylelintResult( './commenting-invalid.css' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/functions.js b/packages/stylelint-config/test/functions.js index 38b0fbf37a3a8..d6fb2a7ddf84e 100644 --- a/packages/stylelint-config/test/functions.js +++ b/packages/stylelint-config/test/functions.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/functions-valid.css', - 'utf-8' - ), - invalidCss = fs.readFileSync( - './packages/stylelint-config/test/functions-invalid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid functions css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './functions-valid.css' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid functions css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidCss, - config, - } ); + result = getStylelintResult( './functions-invalid.css' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/index.js b/packages/stylelint-config/test/index.js index dfc857e8a4504..d974a9ac110f7 100644 --- a/packages/stylelint-config/test/index.js +++ b/packages/stylelint-config/test/index.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/css-valid.css', - 'utf-8' - ), - invalidCss = fs.readFileSync( - './packages/stylelint-config/test/css-invalid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './css-valid.css' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidCss, - config, - } ); + result = getStylelintResult( './css-invalid.css' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/media-queries-invalid.css b/packages/stylelint-config/test/media-queries-invalid.css index c89a2776bb807..8fff7111065e0 100644 --- a/packages/stylelint-config/test/media-queries-invalid.css +++ b/packages/stylelint-config/test/media-queries-invalid.css @@ -8,7 +8,7 @@ /* Your selectors */ } -@media all and (max-width 699px) { +@media all and (unknown) { /* Your selectors */ } diff --git a/packages/stylelint-config/test/media-queries.js b/packages/stylelint-config/test/media-queries.js index a3b59aa0fb541..6b8390e7933b9 100644 --- a/packages/stylelint-config/test/media-queries.js +++ b/packages/stylelint-config/test/media-queries.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/media-queries-valid.css', - 'utf-8' - ), - invalidCss = fs.readFileSync( - './packages/stylelint-config/test/media-queries-invalid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid media queries css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './media-queries-valid.css' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid media queries css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidCss, - config, - } ); + result = getStylelintResult( './media-queries-invalid.css' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/properties.js b/packages/stylelint-config/test/properties.js index 35cedc7697515..51dded0543d43 100644 --- a/packages/stylelint-config/test/properties.js +++ b/packages/stylelint-config/test/properties.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/properties-valid.css', - 'utf-8' - ), - invalidCss = fs.readFileSync( - './packages/stylelint-config/test/properties-invalid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid properties css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './properties-valid.css' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid properties css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidCss, - config, - } ); + result = getStylelintResult( './properties-invalid.css' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/scss.js b/packages/stylelint-config/test/scss.js index 9372d502b0d8a..efe01c3d0f2cc 100644 --- a/packages/stylelint-config/test/scss.js +++ b/packages/stylelint-config/test/scss.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../scss' ), - validScss = fs.readFileSync( - './packages/stylelint-config/test/scss-valid.scss', - 'utf-8' - ), - invalidScss = fs.readFileSync( - './packages/stylelint-config/test/scss-invalid.scss', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid scss', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validScss, - config, - } ); + result = getStylelintResult( './scss-valid.scss' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid scss', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidScss, - config, - } ); + result = getStylelintResult( './scss-invalid.scss' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/selectors-scss.js b/packages/stylelint-config/test/selectors-scss.js index 94a85ff86543e..5ec1f2fbd1b42 100644 --- a/packages/stylelint-config/test/selectors-scss.js +++ b/packages/stylelint-config/test/selectors-scss.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../scss' ), - validScss = fs.readFileSync( - './packages/stylelint-config/test/selectors-valid.scss', - 'utf-8' - ), - invalidScss = fs.readFileSync( - './packages/stylelint-config/test/selectors-invalid.scss', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid selectors scss', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validScss, - config, - } ); + result = getStylelintResult( './selectors-valid.scss' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid selectors scss', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidScss, - config, - } ); + result = getStylelintResult( './selectors-invalid.scss' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/selectors.js b/packages/stylelint-config/test/selectors.js index 337d1d00eed31..276ac87548961 100644 --- a/packages/stylelint-config/test/selectors.js +++ b/packages/stylelint-config/test/selectors.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/selectors-valid.css', - 'utf-8' - ), - invalidCss = fs.readFileSync( - './packages/stylelint-config/test/selectors-invalid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid selectors css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './selectors-valid.css' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid selectors css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidCss, - config, - } ); + result = getStylelintResult( './selectors-invalid.css' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/structure.js b/packages/stylelint-config/test/structure.js index 7ec03a3b667ba..29dc22a35daf1 100644 --- a/packages/stylelint-config/test/structure.js +++ b/packages/stylelint-config/test/structure.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/structure-valid.css', - 'utf-8' - ), - invalidCss = fs.readFileSync( - './packages/stylelint-config/test/structure-invalid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid structure css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './structure-valid.css' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid structure css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidCss, - config, - } ); + result = getStylelintResult( './structure-invalid.css' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/themes.js b/packages/stylelint-config/test/themes.js index f0016832b24d7..0a25c6e871df7 100644 --- a/packages/stylelint-config/test/themes.js +++ b/packages/stylelint-config/test/themes.js @@ -1,26 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/themes-valid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './themes-valid.css' ); } ); it( 'did not error', () => { diff --git a/packages/stylelint-config/test/utils/index.js b/packages/stylelint-config/test/utils/index.js new file mode 100644 index 0000000000000..c24e04f0a67a4 --- /dev/null +++ b/packages/stylelint-config/test/utils/index.js @@ -0,0 +1,34 @@ +/** + * External dependencies + */ +const util = require( 'node:util' ), + path = require( 'node:path' ), + childProcess = require( 'node:child_process' ); + +const execute = util.promisify( childProcess.exec ); + +const generateStylelintCommand = ( filename ) => + 'npx stylelint ' + + path.resolve( __dirname, '../', filename ) + + ' -c' + + path.resolve( __dirname, '../', './.stylelintrc.tests.json' ) + + ' --formatter json' + + ' --ignore-path ' + + path.resolve( __dirname, '../', './.stylelintignore' ); + +module.exports = { + getStylelintResult: ( filename ) => + execute( generateStylelintCommand( filename ) ) + .then( ( { stderr } ) => { + return { + errored: false, + results: JSON.parse( stderr ), + }; + } ) + .catch( ( { stderr } ) => { + return { + errored: true, + results: JSON.parse( stderr ), + }; + } ), +}; diff --git a/packages/stylelint-config/test/values.js b/packages/stylelint-config/test/values.js index 97cbc58e02f3b..749a50a94c204 100644 --- a/packages/stylelint-config/test/values.js +++ b/packages/stylelint-config/test/values.js @@ -1,30 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/values-valid.css', - 'utf-8' - ), - invalidCss = fs.readFileSync( - './packages/stylelint-config/test/values-invalid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid values css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './values-valid.css' ); } ); it( 'did not error', () => { @@ -42,10 +26,7 @@ describe( 'flags warnings with invalid values css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: invalidCss, - config, - } ); + result = getStylelintResult( './values-invalid.css' ); } ); it( 'did error', () => { diff --git a/packages/stylelint-config/test/vendor-prefixes.js b/packages/stylelint-config/test/vendor-prefixes.js index e3ec4d2a7e5df..bc3e1f571aee5 100644 --- a/packages/stylelint-config/test/vendor-prefixes.js +++ b/packages/stylelint-config/test/vendor-prefixes.js @@ -1,26 +1,14 @@ -/** - * External dependencies - */ -const fs = require( 'fs' ), - stylelint = require( 'stylelint' ); - /** * Internal dependencies */ -const config = require( '../' ), - validCss = fs.readFileSync( - './packages/stylelint-config/test/vendor-prefixes-valid.css', - 'utf-8' - ); +const utils = require( './utils' ); +const getStylelintResult = utils.getStylelintResult; describe( 'flags no warnings with valid vendor prefixes css', () => { let result; beforeEach( () => { - result = stylelint.lint( { - code: validCss, - config, - } ); + result = getStylelintResult( './vendor-prefixes-valid.css' ); } ); it( 'did not error', () => {