sass / linter

An experimental Sass linter written using the Dart Sass AST
MIT License
39 stars 6 forks source link

Add a lint rule for fake dimensions #13

Closed nex3 closed 5 years ago

nex3 commented 6 years ago

Users who don't fully understand how Sass's unit arithmetic works will often write code like #{$var}px in an attempt to add units to a number. However, this produces an unquoted string rather than an actual numeric value, which means it won't work with arithmetic or Sass functions. It would be good to provide a lint that suggests they write $var * 1px instead and that links to documentation on how number arithmetic works.