From b24a6eac2c329333027c3701889470eec2da4c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 9 Aug 2026 11:27:29 +0200 Subject: [PATCH] feat(lint): extend spacing-scale to the full off-scale step family on shells MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The shell check caught only the bare `5` step on p/px/py/space-y/gap, so off-scale directional and half-step spacing (`ml-5`, `pl-5`, `gap-3.5`, `py-2.5`, the `7` step) slipped through on hand-rolled card shells. Widen it to the whole spacing prefix family (padding, margin, gap, space) and every banned step — `5`, `7`, and half-steps other than the sanctioned `1.5`. Height stays out of scope: it is a dimension, not a scale step. Verified the rule bites by injecting `gap-3.5` onto a real bg-card+border shell and watching lint flag it, then reverting; the sweep this rule guards left the tree clean apart from one tooltip shell, now on-scale. --- .../__tests__/spacing-scale.test.mjs | 76 +++++++++++++++---- eslint-plugins/healthlog/spacing-scale.js | 59 +++++++++----- 2 files changed, 101 insertions(+), 34 deletions(-) diff --git a/eslint-plugins/healthlog/__tests__/spacing-scale.test.mjs b/eslint-plugins/healthlog/__tests__/spacing-scale.test.mjs index 5c242ecbe..405f9fc27 100644 --- a/eslint-plugins/healthlog/__tests__/spacing-scale.test.mjs +++ b/eslint-plugins/healthlog/__tests__/spacing-scale.test.mjs @@ -60,22 +60,38 @@ ruleTester.run("spacing-scale", rule, { code: '', filename: "/repo/src/components/__tests__/example.test.tsx", }, - // The card-shell `5` check is scoped to the bg-card+border pair, so the + // The card-shell check is scoped to the bg-card+border pair, so the // justified list-marker inset never trips it (no shell). { code: '