Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LengthVariable allow 0? #886

Open
thejamespower opened this issue Feb 1, 2017 · 2 comments
Open

LengthVariable allow 0? #886

thejamespower opened this issue Feb 1, 2017 · 2 comments

Comments

@thejamespower
Copy link

thejamespower commented Feb 1, 2017

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?

@trotzig
Copy link
Contributor

trotzig commented Mar 13, 2017

It looks like this might be a limitation in how LengthVariable works. We'd be happy to look at a PR fixing this!

@karezhest
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants