From e35429538776c9984e6a506ca0354792584afcc6 Mon Sep 17 00:00:00 2001 From: Karol Manijak <20098064+kmanijak@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:44:15 +0200 Subject: [PATCH] Update Markdown lint allowing the same headings if they're not siblings (#51438) * Set markdown rule about Multiple headings to check siblings only * Change the doc to have same headings but not siblings as example * Add changelog * Update docs manifest --- .markdownlint.json | 4 ++-- docs/docs-manifest.json | 4 ++-- docs/product-collection-block/dom-events.md | 8 ++++---- plugins/woocommerce/changelog/doc-update-markdown-lint | 5 +++++ 4 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 plugins/woocommerce/changelog/doc-update-markdown-lint diff --git a/.markdownlint.json b/.markdownlint.json index 5e29a079a84..4a2dd1c3ec4 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -3,8 +3,8 @@ "MD003": { "style": "atx" }, "MD007": { "indent": 4 }, "MD013": { "line_length": 9999 }, - "MD024": { "allow_different_nesting": true }, - "MD033": { "allowed_elements": ["video"] }, + "MD024": { "siblings_only": true }, + "MD033": { "allowed_elements": [ "video" ] }, "no-hard-tabs": false, "whitespace": false } diff --git a/docs/docs-manifest.json b/docs/docs-manifest.json index 45cec2a5a3f..06efcba2d4a 100644 --- a/docs/docs-manifest.json +++ b/docs/docs-manifest.json @@ -1059,7 +1059,7 @@ "menu_title": "DOM Events", "tags": "how-to", "edit_url": "https://github.com/woocommerce/woocommerce/edit/trunk/docs/product-collection-block/dom-events.md", - "hash": "59a4b49eb146774d33229bc60ab7d8f74381493f6e7089ca8f0e2d0eb433a7a4", + "hash": "85cffe1cc273621f16f7362b5efe28ede9689cee0a6e87d0d426014bacc24b05", "url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/docs/product-collection-block/dom-events.md", "id": "c8d247b91472740075871e6b57a9583d893ac650" } @@ -1804,5 +1804,5 @@ "categories": [] } ], - "hash": "dfe48a2a48d383c1f4e5b5bb4258d369dd4e80ac8582462b16bbfedd879cb0bf" + "hash": "3cad7f812ae15abd4936a536cf56db63b0f1b549e26eeb3427fe45989647d58c" } \ No newline at end of file diff --git a/docs/product-collection-block/dom-events.md b/docs/product-collection-block/dom-events.md index 940e49a929d..608a88d71f1 100644 --- a/docs/product-collection-block/dom-events.md +++ b/docs/product-collection-block/dom-events.md @@ -10,13 +10,13 @@ tags: how-to This event is triggered when Product Collection block was rendered or re-rendered (e.g. due to page change). -### `wc-blocks_product_list_rendered` - `detail` parameters +### `detail` parameters | Parameter | Type | Default value | Description | | ------------------ | ------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `collection` | string | `undefined` | Collection type. It's `undefined` for "create your own" collections as the type is not specified. For other Core collections it can be one of type: `woocommerce/product-collection/best-sellers`, `woocommerce/product-collection/featured`, `woocommerce/product-collection/new-arrivals`, `woocommerce/product-collection/on-sale`, `woocommerce/product-collection/top-rated`. For custom collections it will hold their name. | -### `wc-blocks_product_list_rendered` - Example usage +### Example usage ```javascript window.document.addEventListener( @@ -32,14 +32,14 @@ window.document.addEventListener( This event is triggered when some blocks are clicked in order to view product (redirect to product page). -### `wc-blocks_viewed_product` - `detail` parameters +### `detail` parameters | Parameter | Type | Default value | Description | | ------------------ | ------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `collection` | string | `undefined` | Collection type. It's `undefined` for "create your own" collections as the type is not specified. For other Core collections it can be one of type: `woocommerce/product-collection/best-sellers`, `woocommerce/product-collection/featured`, `woocommerce/product-collection/new-arrivals`, `woocommerce/product-collection/on-sale`, `woocommerce/product-collection/top-rated`. For custom collections it will hold their name. | | `productId` | number | | Product ID | -### `wc-blocks_viewed_product` Example usage +### Example usage ```javascript window.document.addEventListener( diff --git a/plugins/woocommerce/changelog/doc-update-markdown-lint b/plugins/woocommerce/changelog/doc-update-markdown-lint new file mode 100644 index 00000000000..4d3d00c11ea --- /dev/null +++ b/plugins/woocommerce/changelog/doc-update-markdown-lint @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Updating Markdown linter rule + +