Skip to content

Commit 969616c

Browse files
committed
fix: ignore dollar signs (sass variables) in declaration-property-value-no-unknown
1 parent 299dc93 commit 969616c

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

index.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
],
1414
"customSyntax": "postcss-scss",
1515
"rules": {
16-
"declaration-property-value-no-unknown": true,
16+
"declaration-property-value-no-unknown": [true, {
17+
"ignoreProperties": {
18+
"/.+/": "/.+\\$.+/"
19+
}
20+
}],
1721
"alpha-value-notation": null,
1822
"annotation-no-unknown": null,
1923
"at-rule-no-unknown": null,

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test('order/properties-order (stylelint-config-property-sort-order-smacss)', asy
4444

4545
test('declaration-property-value-no-unknown', async () => {
4646
const output = await stylelint.lint({
47-
code: 'a { max-width: auto; }\n',
47+
code: 'a { max-width: auto; box-shadow: 0 0 0 $red; }\n',
4848
config,
4949
})
5050
assert.strictEqual(output.results[0].warnings.length, 1)

0 commit comments

Comments
 (0)