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 <custom-ident> values,
not strings.

So, for example, `grid-area: "my_area";` is an error. It should be
`grid-area: my_area;`.
This commit is contained in:
Karl Stolley 2023-05-19 14:16:47 -05:00 committed by Tim Abbott
parent b55adbef3d
commit 6e3e8c9ede
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ module.exports = {
"/^(border(-top|-right|-bottom|-left)?|outline)(-width)?$/": [ "/^(border(-top|-right|-bottom|-left)?|outline)(-width)?$/": [
/\b(thin|medium|thick)\b/, /\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": [ "function-disallowed-list": [
// We use hsl instead of rgb // We use hsl instead of rgb