From 82942ab3b7ca35af062645c9ab2d54ebf54b0b19 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Thu, 19 Mar 2026 23:26:38 +0100 Subject: [PATCH 1/2] chore: do not run build before linting in CI --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78fda90..d41327e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,7 +67,6 @@ jobs: cache: 'npm' node-version: 22 - run: npm ci --ignore-scripts --no-audit --no-fund - - run: npm run build - run: npm run lint npm-audit: From f559c27cf6147d6f60122fe4e1a1209cb5d4702d Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sat, 28 Mar 2026 23:12:26 +0100 Subject: [PATCH 2/2] fix: add whitespace around `>=` in range queries --- src/lib/index.ts | 2 +- test/atrules.test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/index.ts b/src/lib/index.ts index 3fed4e5..f7b589c 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -475,7 +475,7 @@ export function format( return prelude .replace(/\s*([:,])/g, prelude.toLowerCase().includes('selector(') ? '$1' : '$1 ') // force whitespace after colon or comma, except inside `selector()` .replace(/\)([a-zA-Z])/g, ') $1') // force whitespace between closing parenthesis and following text (usually and|or) - .replace(/\s*(=>|<=)\s*/g, ' $1 ') // force whitespace around => and <= + .replace(/\s*(=>|>=|<=)\s*/g, `${OPTIONAL_SPACE}$1${OPTIONAL_SPACE}`) // add optional spacing around =>, >= and <= .replace(/([^<>=\s])([<>])([^<>=\s])/g, `$1${OPTIONAL_SPACE}$2${OPTIONAL_SPACE}$3`) // add spacing around < or > except when it's part of <=, >=, => .replace(/\s+/g, OPTIONAL_SPACE) // collapse multiple whitespaces into one .replace( diff --git a/test/atrules.test.ts b/test/atrules.test.ts index ed7379f..20d9ad9 100644 --- a/test/atrules.test.ts +++ b/test/atrules.test.ts @@ -114,6 +114,7 @@ test('@media prelude formatting', () => { `@media (min-width: 1024px)or (max-width: 1439px) {}`, `@media (min-width: 1024px) or (max-width: 1439px) {}`, ], + [`@media (width>=44rem)or (width<=33rem) {}`, `@media (width >= 44rem) or (width <= 33rem) {}`], [ `@media all and (transform-3d), (-webkit-transform-3d) {}`, `@media all and (transform-3d), (-webkit-transform-3d) {}`,