From fb399b36b7d5a47d35a88dba05c51932f7aed5d1 Mon Sep 17 00:00:00 2001 From: Andreas Haller Date: Tue, 19 Dec 2023 07:54:06 +0100 Subject: [PATCH] fix linting --- blocks/columns/columns.js | 6 +++--- package-lock.json | 4 ++-- package.json | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/blocks/columns/columns.js b/blocks/columns/columns.js index 77432c47..22747504 100644 --- a/blocks/columns/columns.js +++ b/blocks/columns/columns.js @@ -1,15 +1,15 @@ export default function decorate(block) { const id = `gen${crypto.randomUUID().split('-')[0]}`; block.id = id; - + const columns = block.querySelectorAll(':scope > div > div'); const columnCount = columns.length; // following line regex matches partition sizes separated by dashes like 1-2-3 const columnPartionRegex = /^\d{1,}(?:-\d{1,})*$/; const columnPartions = [...block.classList].find((c) => columnPartionRegex.test(c))?.split('-') || []; - + let variables = ''; - for(let i = 0; i < columnCount; i+=1) { + for (let i = 0; i < columnCount; i += 1) { const partition = columnPartions.length > i ? columnPartions[i] : 1; variables += `--column${i}-flex: ${partition};`; } diff --git a/package-lock.json b/package-lock.json index 84797a11..c23bc9b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@adobe/helix-project-boilerplate", - "version": "1.0.0", + "version": "1.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@adobe/helix-project-boilerplate", - "version": "1.0.0", + "version": "1.2.2", "license": "Apache License 2.0", "devDependencies": { "@babel/core": "7.21.0", diff --git a/package.json b/package.json index 112c3dc9..4587406e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "lint:js": "eslint .", "lint:css": "stylelint blocks/**/*.css styles/*.css", "lint": "npm run lint:js && npm run lint:css", + "lint:fix": "npm run lint:js -- --fix && npm run lint:css -- --fix", "semantic-release": "semantic-release --debug" }, "repository": {