diff --git a/src/lint/stylelint.ts b/src/lint/stylelint.ts index d04ecf68e7..338546b30e 100644 --- a/src/lint/stylelint.ts +++ b/src/lint/stylelint.ts @@ -26,12 +26,24 @@ const config: stylelint.Config = { "no-invalid-double-slash-comments": null, - // disallow setting animations, fonts, etc. - "property-disallowed-list": [ + "property-disallowed-list": [[ + // disallow setting animations, fonts, etc. "/animation.*/", "/font.*/", "/transition.*/", - ], + + // prefer `border-color` over `border`, `outline-color` over `outline`, etc. + "border", + "outline", + ], { + message: (property: string) => { + if (["border", "outline"].includes(property)) { + return `Use \`${property}-color\` instead of \`${property}\``; + } else { + return `\`${property}\` is not allowed in Catppuccin userstyles`; + } + }, + }], "function-no-unknown": [ true,