@nvidia-elements/lint
Advanced tools
+10
-0
@@ -0,1 +1,11 @@ | ||
| ## <small>2.1.3 (2026-07-22)</small> | ||
| * chore(ci): disable no-missing-gap-space rule for specific test files ([47ae4ff](https://github.com/NVIDIA/elements/commit/47ae4ff)) | ||
| * chore(release): @nvidia-elements/cli-v2.1.6 [skip ci] ([d6e9957](https://github.com/NVIDIA/elements/commit/d6e9957)) | ||
| * chore(release): @nvidia-elements/core-v2.1.5 [skip ci] ([a704fbe](https://github.com/NVIDIA/elements/commit/a704fbe)) | ||
| * chore(release): @nvidia-elements/core-v2.1.6 [skip ci] ([4a3a305](https://github.com/NVIDIA/elements/commit/4a3a305)) | ||
| * fix(core): clipping descenders on toolbar typography ([7965c3c](https://github.com/NVIDIA/elements/commit/7965c3c)) | ||
| * fix(core): generate valid standalone framework declarations ([1544477](https://github.com/NVIDIA/elements/commit/1544477)) | ||
| * fix(lint): update no-missing-gap-space rule to allow gap-optional values ([df74628](https://github.com/NVIDIA/elements/commit/df74628)) | ||
| ## <small>2.1.2 (2026-07-21)</small> | ||
@@ -2,0 +12,0 @@ |
@@ -5,3 +5,3 @@ import { elementsHtmlConfig as e } from "../lint/src/eslint/configs/html.js"; | ||
| //#region src/eslint/index.ts | ||
| var r = "2.1.2", i = [ | ||
| var r = "2.1.3", i = [ | ||
| e, | ||
@@ -8,0 +8,0 @@ t, |
@@ -7,3 +7,3 @@ import type { Rule } from 'eslint'; | ||
| readonly docs: { | ||
| readonly description: 'Require gap spacing on row and column layouts.'; | ||
| readonly description: 'Require gap spacing on row, column, and grid layouts.'; | ||
| readonly category: 'Best Practice'; | ||
@@ -10,0 +10,0 @@ readonly recommended: true; |
+1
-1
| //#region src/index.ts | ||
| var e = "2.1.2"; | ||
| var e = "2.1.3"; | ||
| //#endregion | ||
| export { e as VERSION }; |
@@ -120,4 +120,4 @@ import e from "../rules/no-complex-popovers.js"; | ||
| "@nvidia-elements/lint/prefer-aria-label-in-compact-containers": ["error"], | ||
| "@nvidia-elements/lint/no-unexpected-style-customization": ["off"], | ||
| "@nvidia-elements/lint/no-missing-gap-space": ["off"] | ||
| "@nvidia-elements/lint/no-missing-gap-space": ["error"], | ||
| "@nvidia-elements/lint/no-unexpected-style-customization": ["off"] | ||
| } | ||
@@ -124,0 +124,0 @@ }; |
@@ -5,7 +5,16 @@ import { VALUE_BINDINGS as e } from "../internals/attributes.js"; | ||
| //#region src/eslint/rules/no-missing-gap-space.ts | ||
| var r = [ | ||
| var r = /* @__PURE__ */ new Set([ | ||
| "full", | ||
| "align:center", | ||
| "align:horizontal-center", | ||
| "align:vertical-center", | ||
| "align:stretch", | ||
| "align:horizontal-stretch", | ||
| "align:vertical-stretch", | ||
| "align:left", | ||
| "align:right", | ||
| "align:space-around", | ||
| "align:space-between", | ||
| "align:space-evenly" | ||
| ], i = [ | ||
| ]), i = [ | ||
| "xs", | ||
@@ -16,3 +25,23 @@ "sm", | ||
| "xl" | ||
| ], a = { | ||
| ]; | ||
| function a(e) { | ||
| return e.some((e) => r.has(e)); | ||
| } | ||
| function o(e, t) { | ||
| return `${e} gap:${t}`; | ||
| } | ||
| function s({ context: e, layoutAttr: t, value: n }) { | ||
| let [r, a] = t.startWrapper && t.endWrapper ? [t.startWrapper.value, t.endWrapper.value] : ["\"", "\""]; | ||
| e.report({ | ||
| node: t, | ||
| messageId: "missing-gap-space", | ||
| data: { layout: n }, | ||
| suggest: i.map((e) => ({ | ||
| messageId: "suggest-add-gap", | ||
| data: { size: e }, | ||
| fix: (i) => i.replaceText(t, `nve-layout=${r}${o(n, e)}${a}`) | ||
| })) | ||
| }); | ||
| } | ||
| var c = { | ||
| meta: { | ||
@@ -22,3 +51,3 @@ type: "problem", | ||
| docs: { | ||
| description: "Require gap spacing on row and column layouts.", | ||
| description: "Require gap spacing on row, column, and grid layouts.", | ||
| category: "Best Practice", | ||
@@ -34,19 +63,14 @@ recommended: !0, | ||
| }, | ||
| create(a) { | ||
| return t(a, { Tag(t) { | ||
| let o = n(t, "nve-layout"); | ||
| if (!o) return; | ||
| let s = o.value?.value ?? ""; | ||
| if (e.some((e) => s.includes(e))) return; | ||
| let c = s.split(" ").filter((e) => e !== ""); | ||
| (c.includes("row") || c.includes("column")) && (c.some((e) => e.startsWith("gap:")) || c.some((e) => r.includes(e)) || a.report({ | ||
| node: o, | ||
| messageId: "missing-gap-space", | ||
| data: { layout: s }, | ||
| suggest: i.map((e) => ({ | ||
| messageId: "suggest-add-gap", | ||
| data: { size: e }, | ||
| fix: (t) => t.replaceText(o, `nve-layout=${o.startWrapper.value}${s} gap:${e}${o.endWrapper.value}`) | ||
| })) | ||
| })); | ||
| create(r) { | ||
| return t(r, { Tag(t) { | ||
| let i = n(t, "nve-layout"); | ||
| if (!i) return; | ||
| let o = i.value?.value ?? ""; | ||
| if (e.some((e) => o.includes(e))) return; | ||
| let c = o.split(/\s+/).filter(Boolean), l = c.includes("row") || c.includes("column") || c.includes("grid"), u = c.some((e) => e.startsWith("gap:")); | ||
| !l || u || a(c) || s({ | ||
| context: r, | ||
| layoutAttr: i, | ||
| value: o | ||
| }); | ||
| } }); | ||
@@ -56,2 +80,2 @@ } | ||
| //#endregion | ||
| export { a as default }; | ||
| export { c as default }; |
+2
-2
| { | ||
| "name": "@nvidia-elements/lint", | ||
| "version": "2.1.2", | ||
| "version": "2.1.3", | ||
| "release": { | ||
@@ -77,4 +77,4 @@ "extends": "../../release.config.js" | ||
| "vitest": "4.1.10", | ||
| "@internals/metadata": "0.0.0", | ||
| "@internals/eslint": "0.0.0", | ||
| "@internals/metadata": "0.0.0", | ||
| "@internals/vite": "0.0.0" | ||
@@ -81,0 +81,0 @@ }, |
+1
-1
@@ -81,3 +81,3 @@ # @nvidia-elements/lint | ||
| | `@nvidia-elements/lint/no-missing-control-label` | Require form controls to have an accessible label. | HTML | `error` | | ||
| | `@nvidia-elements/lint/no-missing-gap-space` | Require gap spacing on row and column layouts. | HTML | `off` | | ||
| | `@nvidia-elements/lint/no-missing-gap-space` | Require gap spacing on row, column, and grid layouts. | HTML | `error` | | ||
| | `@nvidia-elements/lint/no-missing-icon-name` | Require icon elements to have an icon name attribute. | HTML | `error` | | ||
@@ -84,0 +84,0 @@ | `@nvidia-elements/lint/no-missing-popover-trigger` | Require popover elements to have a corresponding trigger element. | HTML | `error` | |
Sorry, the diff of this file is too big to display
2158086
0.09%11382
0.23%