Skip to content

Commit 211db38

Browse files
committed
Add linting against the use of if function
The `if-function` deprecation warning only comes with Sass 1.95[^1], and we don't want to update quite yet so we can keep tracking `mixed-decls` warnings until we upgrade sass[^2]. Stylelint will help us keep track of our usage of the `if` function in the meantime. Because our code is written in Scss, we need to enable the rule from `stylelint-scss`, rather than the one provided by stylelint. [^1]: https://sass-lang.com/documentation/breaking-changes/if-function/ [^2]: #6690
1 parent 4b57d97 commit 211db38

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

stylelint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ module.exports = {
209209
'src',
210210
'cursor',
211211
'-webkit-appearance'
212-
]
212+
],
213+
'scss/function-disallowed-list': ['if']
213214
}
214215
}

0 commit comments

Comments
 (0)