Skip to content

Commit

Permalink
ci(lint): disallow boder/outline, add message
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Nov 16, 2023
1 parent 922a5d2 commit 570182b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/lint/stylelint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 570182b

Please sign in to comment.