From f77d54fa9a4c577180e61dedea7fa2103983fd4d Mon Sep 17 00:00:00 2001 From: drill-lancer Date: Thu, 28 Sep 2023 13:57:49 +0900 Subject: [PATCH] lint --- src/blocks/_pro/blog-card-excerpt/block.json | 6 +- .../_pro/blog-card-featured-image/block.json | 8 +- .../_pro/blog-card-site-logo/block.json | 8 +- .../_pro/blog-card-site-title/block.json | 6 +- src/blocks/_pro/blog-card-title/block.json | 6 +- src/blocks/_pro/blog-card/block.json | 2 +- src/blocks/_pro/breadcrumb/block.json | 2 +- src/blocks/_pro/dynamic-text/block.json | 11 +- src/blocks/_pro/grid-column-item/block.json | 4 +- .../_pro/gridcolcard-item-body/block.json | 4 +- .../_pro/gridcolcard-item-footer/block.json | 4 +- .../_pro/gridcolcard-item-header/block.json | 5 +- src/blocks/_pro/gridcolcard-item/block.json | 5 +- src/blocks/_pro/icon-card-item/block.json | 2 +- src/blocks/_pro/post-list/block.json | 2 +- src/blocks/_pro/post-new-badge/block.json | 2 +- .../_pro/select-post-list-item/block.json | 2 +- src/blocks/faq2-a/block.json | 4 +- src/blocks/faq2-q/block.json | 4 +- src/blocks/pr-blocks/block.json | 16 +-- src/blocks/slider-item/block.json | 2 +- src/blocks/spacer/block.json | 58 ++++---- src/blocks/staff/block.json | 126 +++++++++--------- src/extensions/core/group/style.js | 16 +-- 24 files changed, 137 insertions(+), 168 deletions(-) diff --git a/src/blocks/_pro/blog-card-excerpt/block.json b/src/blocks/_pro/blog-card-excerpt/block.json index 00a706d87..da4d38287 100644 --- a/src/blocks/_pro/blog-card-excerpt/block.json +++ b/src/blocks/_pro/blog-card-excerpt/block.json @@ -5,7 +5,7 @@ "title": "Blog Card Excerpt", "description": "Shows an excerpt retrieved from a URL.", "textdomain": "vk-blocks-pro", - "ancestor": [ "vk-blocks/blog-card" ], + "ancestor": ["vk-blocks/blog-card"], "attributes": { "textAlign": { "type": "string" @@ -14,9 +14,7 @@ "type": "number" } }, - "usesContext": [ - "vk-blocks/blog-card-url" - ], + "usesContext": ["vk-blocks/blog-card-url"], "supports": { "html": false, "reusable": false, diff --git a/src/blocks/_pro/blog-card-featured-image/block.json b/src/blocks/_pro/blog-card-featured-image/block.json index 7a8161d1b..e61bb7b42 100644 --- a/src/blocks/_pro/blog-card-featured-image/block.json +++ b/src/blocks/_pro/blog-card-featured-image/block.json @@ -5,7 +5,7 @@ "title": "Blog Card Featured Image", "description": "Displays the featured image obtained from the URL.", "textdomain": "vk-blocks-pro", - "ancestor": [ "vk-blocks/blog-card" ], + "ancestor": ["vk-blocks/blog-card"], "attributes": { "isLink": { "type": "boolean", @@ -34,11 +34,9 @@ "default": "_self" } }, - "usesContext": [ - "vk-blocks/blog-card-url" - ], + "usesContext": ["vk-blocks/blog-card-url"], "supports": { - "align": [ "left", "right", "center" ], + "align": ["left", "right", "center"], "color": { "__experimentalDuotone": "img", "text": false, diff --git a/src/blocks/_pro/blog-card-site-logo/block.json b/src/blocks/_pro/blog-card-site-logo/block.json index 634e1b439..01a05e959 100644 --- a/src/blocks/_pro/blog-card-site-logo/block.json +++ b/src/blocks/_pro/blog-card-site-logo/block.json @@ -5,7 +5,7 @@ "title": "Blog Card Site Logo", "description": "Displays the site logo image obtained from the URL.", "textdomain": "vk-blocks-pro", - "ancestor": [ "vk-blocks/blog-card" ], + "ancestor": ["vk-blocks/blog-card"], "attributes": { "isLink": { "type": "boolean", @@ -21,11 +21,9 @@ "default": "_self" } }, - "usesContext": [ - "vk-blocks/blog-card-url" - ], + "usesContext": ["vk-blocks/blog-card-url"], "supports": { - "align": [ "left", "right", "center" ], + "align": ["left", "right", "center"], "color": { "__experimentalDuotone": "img", "text": false, diff --git a/src/blocks/_pro/blog-card-site-title/block.json b/src/blocks/_pro/blog-card-site-title/block.json index 3af2cc876..6ff3f8bc7 100644 --- a/src/blocks/_pro/blog-card-site-title/block.json +++ b/src/blocks/_pro/blog-card-site-title/block.json @@ -5,7 +5,7 @@ "title": "Blog Card Site Title", "description": "Displays the site title obtained from the URL.", "textdomain": "vk-blocks-pro", - "ancestor": [ "vk-blocks/blog-card" ], + "ancestor": ["vk-blocks/blog-card"], "attributes": { "level": { "type": "number", @@ -28,9 +28,7 @@ "default": "_self" } }, - "usesContext": [ - "vk-blocks/blog-card-url" - ], + "usesContext": ["vk-blocks/blog-card-url"], "supports": { "color": { "gradients": true, diff --git a/src/blocks/_pro/blog-card-title/block.json b/src/blocks/_pro/blog-card-title/block.json index 2d5a620e2..6dcddafeb 100644 --- a/src/blocks/_pro/blog-card-title/block.json +++ b/src/blocks/_pro/blog-card-title/block.json @@ -5,7 +5,7 @@ "title": "Blog Card Title", "description": "Displays the title obtained from the URL.", "textdomain": "vk-blocks-pro", - "ancestor": [ "vk-blocks/blog-card" ], + "ancestor": ["vk-blocks/blog-card"], "attributes": { "textAlign": { "type": "string" @@ -28,9 +28,7 @@ "default": "_self" } }, - "usesContext": [ - "vk-blocks/blog-card-url" - ], + "usesContext": ["vk-blocks/blog-card-url"], "supports": { "color": { "gradients": true, diff --git a/src/blocks/_pro/blog-card/block.json b/src/blocks/_pro/blog-card/block.json index 43b9e5797..ef18d7f98 100644 --- a/src/blocks/_pro/blog-card/block.json +++ b/src/blocks/_pro/blog-card/block.json @@ -15,7 +15,7 @@ }, "textdomain": "vk-blocks-pro", "supports": { - "align": [ "wide", "full" ], + "align": ["wide", "full"], "__experimentalBorder": { "color": true, "radius": true, diff --git a/src/blocks/_pro/breadcrumb/block.json b/src/blocks/_pro/breadcrumb/block.json index 488e28ae6..3c490b471 100644 --- a/src/blocks/_pro/breadcrumb/block.json +++ b/src/blocks/_pro/breadcrumb/block.json @@ -14,4 +14,4 @@ "padding": true } } -} \ No newline at end of file +} diff --git a/src/blocks/_pro/dynamic-text/block.json b/src/blocks/_pro/dynamic-text/block.json index 883211a93..ce38e6c74 100644 --- a/src/blocks/_pro/dynamic-text/block.json +++ b/src/blocks/_pro/dynamic-text/block.json @@ -3,9 +3,7 @@ "name": "vk-blocks/dynamic-text", "category": "vk-blocks-cat", "title": "Dynamic Text", - "usesContext": [ - "postId" - ], + "usesContext": ["postId"], "attributes": { "textAlign": { "type": "string", @@ -44,10 +42,7 @@ "textdomain": "vk-blocks-pro", "supports": { "className": true, - "align": [ - "wide", - "full" - ], + "align": ["wide", "full"], "anchor": true, "html": false, "color": { @@ -79,4 +74,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/blocks/_pro/grid-column-item/block.json b/src/blocks/_pro/grid-column-item/block.json index d996213d8..707d9541a 100644 --- a/src/blocks/_pro/grid-column-item/block.json +++ b/src/blocks/_pro/grid-column-item/block.json @@ -5,9 +5,7 @@ "description": "One item in a grit column block.", "textdomain": "vk-blocks-pro", "category": "vk-blocks-cat-layout", - "parent": [ - "vk-blocks/grid-column" - ], + "parent": ["vk-blocks/grid-column"], "attributes": { "layout": { "type": "string", diff --git a/src/blocks/_pro/gridcolcard-item-body/block.json b/src/blocks/_pro/gridcolcard-item-body/block.json index 60a995736..72973d134 100644 --- a/src/blocks/_pro/gridcolcard-item-body/block.json +++ b/src/blocks/_pro/gridcolcard-item-body/block.json @@ -5,9 +5,7 @@ "textdomain": "vk-blocks-pro", "category": "vk-blocks-cat-layout", "description": "Body of Grid Column Card Block Item", - "parent": [ - "vk-blocks/gridcolcard-item" - ], + "parent": ["vk-blocks/gridcolcard-item"], "supports": { "html": false }, diff --git a/src/blocks/_pro/gridcolcard-item-footer/block.json b/src/blocks/_pro/gridcolcard-item-footer/block.json index b5f6c01e6..9b8050c90 100644 --- a/src/blocks/_pro/gridcolcard-item-footer/block.json +++ b/src/blocks/_pro/gridcolcard-item-footer/block.json @@ -5,9 +5,7 @@ "textdomain": "vk-blocks-pro", "category": "vk-blocks-cat-layout", "description": "Footer button area of Grid Column Card Block Item", - "parent": [ - "vk-blocks/gridcolcard-item" - ], + "parent": ["vk-blocks/gridcolcard-item"], "supports": { "html": false }, diff --git a/src/blocks/_pro/gridcolcard-item-header/block.json b/src/blocks/_pro/gridcolcard-item-header/block.json index 20240e298..05d284f06 100644 --- a/src/blocks/_pro/gridcolcard-item-header/block.json +++ b/src/blocks/_pro/gridcolcard-item-header/block.json @@ -5,9 +5,7 @@ "textdomain": "vk-blocks-pro", "category": "vk-blocks-cat-layout", "description": "Header image area of Grid Column Card Block Item", - "parent": [ - "vk-blocks/gridcolcard-item" - ], + "parent": ["vk-blocks/gridcolcard-item"], "supports": { "html": false }, @@ -34,5 +32,4 @@ "default": "delete" } } - } diff --git a/src/blocks/_pro/gridcolcard-item/block.json b/src/blocks/_pro/gridcolcard-item/block.json index df5bb94c8..ded7ea3a8 100644 --- a/src/blocks/_pro/gridcolcard-item/block.json +++ b/src/blocks/_pro/gridcolcard-item/block.json @@ -5,9 +5,7 @@ "textdomain": "vk-blocks-pro", "category": "vk-blocks-cat-layout", "description": "It is a block of single column of Grid Column Card.", - "parent": [ - "vk-blocks/gridcolcard" - ], + "parent": ["vk-blocks/gridcolcard"], "supports": { "anchor": true, "html": false, @@ -72,5 +70,4 @@ "default": false } } - } diff --git a/src/blocks/_pro/icon-card-item/block.json b/src/blocks/_pro/icon-card-item/block.json index 20909d22a..e72c7342a 100644 --- a/src/blocks/_pro/icon-card-item/block.json +++ b/src/blocks/_pro/icon-card-item/block.json @@ -2,7 +2,7 @@ "apiVersion": 2, "name": "vk-blocks/icon-card-item", "category": "vk-blocks-cat", - "title":"Icon Card Item", + "title": "Icon Card Item", "attributes": { "col_xs": { "type": "number", diff --git a/src/blocks/_pro/post-list/block.json b/src/blocks/_pro/post-list/block.json index a9041fa1f..b95562550 100644 --- a/src/blocks/_pro/post-list/block.json +++ b/src/blocks/_pro/post-list/block.json @@ -134,4 +134,4 @@ "supports": { "className": true } -} \ No newline at end of file +} diff --git a/src/blocks/_pro/post-new-badge/block.json b/src/blocks/_pro/post-new-badge/block.json index 634de29e1..067740428 100644 --- a/src/blocks/_pro/post-new-badge/block.json +++ b/src/blocks/_pro/post-new-badge/block.json @@ -20,7 +20,7 @@ }, "description": "Easily highlight your latest content or products with the 'New Badge' feature.", "textdomain": "vk-blocks-pro", - "usesContext": [ "postId", "postType" ], + "usesContext": ["postId", "postType"], "supports": { "className": true, "anchor": false, diff --git a/src/blocks/_pro/select-post-list-item/block.json b/src/blocks/_pro/select-post-list-item/block.json index 58329d6ba..05ec69bf3 100644 --- a/src/blocks/_pro/select-post-list-item/block.json +++ b/src/blocks/_pro/select-post-list-item/block.json @@ -5,7 +5,7 @@ "category": "vk-blocks-cat", "parent": ["vk-blocks/select-post-list"], "attributes": { - "className":{ + "className": { "type": "string", "default": "" }, diff --git a/src/blocks/faq2-a/block.json b/src/blocks/faq2-a/block.json index 814cc3114..7488c5c95 100644 --- a/src/blocks/faq2-a/block.json +++ b/src/blocks/faq2-a/block.json @@ -3,9 +3,7 @@ "name": "vk-blocks/faq2-a", "category": "vk-blocks-cat", "title": "FAQ Answer", - "parent": [ - "vk-blocks/faq2" - ], + "parent": ["vk-blocks/faq2"], "description": "Answer area where you can add blocks freely.", "textdomain": "vk-blocks-pro", "supports": { diff --git a/src/blocks/faq2-q/block.json b/src/blocks/faq2-q/block.json index 86d48a5b8..c19f4a037 100644 --- a/src/blocks/faq2-q/block.json +++ b/src/blocks/faq2-q/block.json @@ -3,9 +3,7 @@ "name": "vk-blocks/faq2-q", "title": "FAQ Question", "category": "vk-blocks-cat", - "parent": [ - "vk-blocks/faq2" - ], + "parent": ["vk-blocks/faq2"], "description": "Question area where you can freely add blocks.", "textdomain": "vk-blocks-pro", "supports": { diff --git a/src/blocks/pr-blocks/block.json b/src/blocks/pr-blocks/block.json index afaa71f8d..124ca9d6d 100644 --- a/src/blocks/pr-blocks/block.json +++ b/src/blocks/pr-blocks/block.json @@ -4,22 +4,22 @@ "title": "PR Blocks (not recommended)", "category": "vk-blocks-cat", "attributes": { - "heading1" :{ + "heading1": { "type": "string", "source": "html", "selector": ".vk_prBlocks_item_title-1" }, - "heading2" :{ + "heading2": { "type": "string", "source": "html", "selector": ".vk_prBlocks_item_title-2" }, - "heading3" :{ + "heading3": { "type": "string", "source": "html", "selector": ".vk_prBlocks_item_title-3" }, - "heading4" :{ + "heading4": { "type": "string", "source": "html", "selector": ".vk_prBlocks_item_title-4" @@ -92,16 +92,16 @@ "type": "string", "default": "" }, - "color1":{ + "color1": { "type": "string" }, - "color2":{ + "color2": { "type": "string" }, - "color3":{ + "color3": { "type": "string" }, - "color4":{ + "color4": { "type": "string" }, "bgType1": { diff --git a/src/blocks/slider-item/block.json b/src/blocks/slider-item/block.json index c9e3f2a2a..cc595e255 100644 --- a/src/blocks/slider-item/block.json +++ b/src/blocks/slider-item/block.json @@ -5,7 +5,7 @@ "description": "This is one item in the slider.", "textdomain": "vk-blocks-pro", "category": "vk-blocks-cat-layout", - "parent": [ "vk-blocks/slider"] , + "parent": ["vk-blocks/slider"], "attributes": { "verticalAlignment": { "type": "string", diff --git a/src/blocks/spacer/block.json b/src/blocks/spacer/block.json index 73df095be..8b7df31bd 100644 --- a/src/blocks/spacer/block.json +++ b/src/blocks/spacer/block.json @@ -2,39 +2,39 @@ "apiVersion": 2, "name": "vk-blocks/spacer", "title": "Responsive Spacer", - "description": "Use responsive spacers to get the margins right.", + "description": "Use responsive spacers to get the margins right.", "category": "vk-blocks-cat", "attributes": { "anchor": { - "type": "string", - "default": null - }, - "spaceType": { - "type": "string", - "default": "margin-top" - }, - "unit": { - "type": "string", - "default": "px" - }, - "pc": { - "type": "number", - "default": 40 - }, - "tablet": { - "type": "number", - "default": 30 - }, - "mobile": { - "type": "number", - "default": 20 - }, - "spaceSize": { - "type": "string", - "default": "medium" - } + "type": "string", + "default": null + }, + "spaceType": { + "type": "string", + "default": "margin-top" + }, + "unit": { + "type": "string", + "default": "px" + }, + "pc": { + "type": "number", + "default": 40 + }, + "tablet": { + "type": "number", + "default": 30 + }, + "mobile": { + "type": "number", + "default": 20 + }, + "spaceSize": { + "type": "string", + "default": "medium" + } }, - "textdomain": "vk-blocks-pro", + "textdomain": "vk-blocks-pro", "supports": { "anchor": true } diff --git a/src/blocks/staff/block.json b/src/blocks/staff/block.json index 82118ffbc..3b47c3ba4 100644 --- a/src/blocks/staff/block.json +++ b/src/blocks/staff/block.json @@ -2,71 +2,71 @@ "apiVersion": 2, "name": "vk-blocks/staff", "category": "vk-blocks-cat", - "title": "Staff", - "description": "Used for staff introduction, company introduction, school introduction, menu, etc.", - "textdomain": "vk-blocks-pro", + "title": "Staff", + "description": "Used for staff introduction, company introduction, school introduction, menu, etc.", + "textdomain": "vk-blocks-pro", "attributes": { "vk_staff_text_name": { - "type": "string", - "source": "html", - "selector": "h3" - }, - "vk_staff_text_caption": { - "type": "string", - "source": "html", - "selector": "p.vk_staff_text_caption" - }, - "vk_staff_text_role": { - "type": "string", - "source": "html", - "selector": "p.vk_staff_text_role" - }, - "vk_staff_text_profileTitle": { - "type": "string", - "source": "html", - "selector": "h4" - }, - "vk_staff_text_profileText": { - "type": "string", - "source": "html", - "selector": "p.vk_staff_text_profileText" - }, - "vk_staff_photo_image": { - "type": "string", - "default": "" - }, - "vk_staff_photo_image_alt": { - "type": "string", - "default": "Profile Picture" - }, - "vk_staff_layout": { - "type": "string", - "default": "default" - }, - "vk_staff_nameColor": { - "type": "string" - }, - "vk_staff_captionColor": { - "type": "string" - }, - "vk_staff_positionColor": { - "type": "string" - }, - "vk_staff_profileTitleColor": { - "type": "string" - }, - "vk_staff_profileTextColor": { - "type": "string" - }, - "vk_staff_photoBorder": { - "type": "string", - "default": "default" - }, - "vk_staff_fontFamily": { - "type": "string", - "default": "0" - } - }, + "type": "string", + "source": "html", + "selector": "h3" + }, + "vk_staff_text_caption": { + "type": "string", + "source": "html", + "selector": "p.vk_staff_text_caption" + }, + "vk_staff_text_role": { + "type": "string", + "source": "html", + "selector": "p.vk_staff_text_role" + }, + "vk_staff_text_profileTitle": { + "type": "string", + "source": "html", + "selector": "h4" + }, + "vk_staff_text_profileText": { + "type": "string", + "source": "html", + "selector": "p.vk_staff_text_profileText" + }, + "vk_staff_photo_image": { + "type": "string", + "default": "" + }, + "vk_staff_photo_image_alt": { + "type": "string", + "default": "Profile Picture" + }, + "vk_staff_layout": { + "type": "string", + "default": "default" + }, + "vk_staff_nameColor": { + "type": "string" + }, + "vk_staff_captionColor": { + "type": "string" + }, + "vk_staff_positionColor": { + "type": "string" + }, + "vk_staff_profileTitleColor": { + "type": "string" + }, + "vk_staff_profileTextColor": { + "type": "string" + }, + "vk_staff_photoBorder": { + "type": "string", + "default": "default" + }, + "vk_staff_fontFamily": { + "type": "string", + "default": "0" + } + }, "supports": { "className": true } diff --git a/src/extensions/core/group/style.js b/src/extensions/core/group/style.js index de5dc4877..06c32bfdd 100644 --- a/src/extensions/core/group/style.js +++ b/src/extensions/core/group/style.js @@ -68,14 +68,14 @@ export const addBlockControl = createHigherOrderComponent((BlockEdit) => { inputClassName.split(' '); const filterClassName = - inputClassName.filter(function ( - name - ) { - return ( - -1 === - name.indexOf('vk-has-') - ); - }); + inputClassName.filter( + function (name) { + return ( + -1 === + name.indexOf('vk-has-') + ); + } + ); filterClassName.push(newClassName);