From 6e3e8c9edeeb71b87fc40ded95f6ff40b1122c6f Mon Sep 17 00:00:00 2001 From: Karl Stolley Date: Fri, 19 May 2023 14:16:47 -0500 Subject: [PATCH] linter: Lint grid-area names for quotation marks. This adds a CSS stylelint rule that will catch erroneous quotation marks around named grid-areas, which should be values, not strings. So, for example, `grid-area: "my_area";` is an error. It should be `grid-area: my_area;`. --- stylelint.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stylelint.config.js b/stylelint.config.js index 53feeb8810..44953fd3e6 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -28,6 +28,9 @@ module.exports = { "/^(border(-top|-right|-bottom|-left)?|outline)(-width)?$/": [ /\b(thin|medium|thick)\b/, ], + // no quotation marks around grid-area; use + // `grid-area: my_area`, not `grid-area: "my_area"` + "grid-area": [/".*"/], }, "function-disallowed-list": [ // We use hsl instead of rgb