diff options
author | silverwind <me@silverwind.io> | 2023-10-13 10:19:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-13 08:19:21 +0000 |
commit | 532f166c4dc7087a98e86aa1de5b697e6b5c6e4f (patch) | |
tree | 75a5ff4b1140823ce58c2d865163b3416bcc3044 /.stylelintrc.yaml | |
parent | 3e9a379d38eae8bec12ad49a4488b8e2940729d1 (diff) | |
download | gitea-532f166c4dc7087a98e86aa1de5b697e6b5c6e4f.tar.gz gitea-532f166c4dc7087a98e86aa1de5b697e6b5c6e4f.zip |
Enable shorthands in `declaration-strict-value` linter (#27597)
Enable [shorthand
matching](https://github.com/AndyOGo/stylelint-declaration-strict-value#expandshorthand)
in this lint rule and match color properties by regex. Patterns like
this will now fail lint:
```css
background: #123456;
border: 1px sold rgba(0,0,0,0);
```
Diffstat (limited to '.stylelintrc.yaml')
-rw-r--r-- | .stylelintrc.yaml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.stylelintrc.yaml b/.stylelintrc.yaml index f30d79d71f..f889a6867c 100644 --- a/.stylelintrc.yaml +++ b/.stylelintrc.yaml @@ -103,7 +103,7 @@ rules: property-no-vendor-prefix: null rule-empty-line-before: null rule-selector-property-disallowed-list: null - scale-unlimited/declaration-strict-value: [[color, background-color, border-color, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false, disableFix: true}] + scale-unlimited/declaration-strict-value: [[/color$/, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false, disableFix: true, expandShorthand: true}] selector-attribute-name-disallowed-list: null selector-attribute-operator-allowed-list: null selector-attribute-operator-disallowed-list: null |