Add and apply function-calculation-no-interpolation rule

This stylelint-scss rule is useful because we were inconsistent when
using calc(); sometimes we added interpolation to Sass variables, and
sometimes we didn't. The reason why we originally added interpolation
was that it was necessary until we migrated to Dart Sass in commit
d54971e53. Since then, we can omit the interpolation, which is also what
the Sass documentation recommends [1].

[1] https://sass-lang.com/documentation/values/calculations/
This commit is contained in:
Javi Martín
2025-02-28 13:25:52 +01:00
parent a60926c44b
commit f460d3bc31
63 changed files with 243 additions and 242 deletions

View File

@@ -66,6 +66,7 @@ rules:
scss/at-mixin-pattern: "^(-?[a-z][a-z0-9]*)(-[a-z0-9]+)*$"
scss/dollar-variable-colon-space-before: never
scss/dollar-variable-pattern: "^(-?[a-z][a-z0-9]*)(-[a-z0-9]+)*$"
scss/function-calculation-no-interpolation: true
scss/load-no-partial-leading-underscore: true
scss/load-partial-extension: never
scss/no-unused-private-members: true