From e719ffe9be259f9f96cc9a4ab695f3dfa38c7ca5 Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Sat, 14 Dec 2024 21:51:06 +0100 Subject: [PATCH] fix --- scripts/utilities/validateTokenWithSchema.ts | 1 + scripts/validateTokenJson.ts | 5 ++--- src/transformers/colorAlphaToCss.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/utilities/validateTokenWithSchema.ts b/scripts/utilities/validateTokenWithSchema.ts index 7404f8fd5..2d60ba135 100644 --- a/scripts/utilities/validateTokenWithSchema.ts +++ b/scripts/utilities/validateTokenWithSchema.ts @@ -8,6 +8,7 @@ export type validationErrors = { const unpackErrorDetails = details => { const errorObjectByCode = { + //eslint-disable-next-line camelcase invalid_union: 'unionErrors', } return { diff --git a/scripts/validateTokenJson.ts b/scripts/validateTokenJson.ts index cbf481f59..3d488f90d 100644 --- a/scripts/validateTokenJson.ts +++ b/scripts/validateTokenJson.ts @@ -68,12 +68,11 @@ if (getFlag('--silent') === null) { for (const path of Object.keys(fail.errorsByPath)) { // eslint-disable-next-line no-console console.log(`\nPath: \u001b[34;1m\u001b[1m${path}\u001b[0m`) - - console.log(fail.errorsByPath) + // eslint-disable-next-line no-console console.log( fail.errorsByPath[path] .map( - ({message, code, path, errors}) => + ({message, code, errors}) => `${message.replace(/\*\*(.*?)\*\*/g, '- \u001b[31;1m\u001b[1m$1\u001b[0m').replace(/\n(?!-)/g, '\n ↳ ')}, code: ${code}, errors:\n ${errors .map(error => { return `- ${error.issues[0].code}: ${error.issues[0].message}` diff --git a/src/transformers/colorAlphaToCss.ts b/src/transformers/colorAlphaToCss.ts index 92f8b53c9..2cb82046a 100644 --- a/src/transformers/colorAlphaToCss.ts +++ b/src/transformers/colorAlphaToCss.ts @@ -1,4 +1,4 @@ -import {Transform, TransformedToken} from 'style-dictionary/types' +import type {Transform, TransformedToken} from 'style-dictionary/types' import {isColorWithAlpha} from '../filters/isColorWithAlpha.js' import {getTokenValue} from './utilities/getTokenValue.js'