scss-lint
scss-lint copied to clipboard
LengthVariable allow 0?
I'd like to ignore zero values from the LengthVariable linter.
This is my config:
LengthVariable:
enabled: true
allowed_lengths: [0]
But I still get this:
Length literals like 0 should only be used in variable declarations;...
How can I get the effect I require?
It looks like this might be a limitation in how LengthVariable works. We'd be happy to look at a PR fixing this!
Easy fix for this would be allowed_lengths: ["0"]
When you put smth like allowed_lengths: [0, 20px], config['allowed_lengths'] outputs [0, "20px"].
I have no idea how to fix it in code though.