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

Should accept false options #119

Closed
Ulrikop opened this issue Oct 19, 2016 · 3 comments
Closed

Should accept false options #119

Ulrikop opened this issue Oct 19, 2016 · 3 comments

Comments

@Ulrikop
Copy link

Ulrikop commented Oct 19, 2016

Hi,
when I add explicitly a false to a rule, it throws an error. I think this should be an accepted value.

I like it when I can look at pug-lintrc to see what is configured without to know which rules are implicitly set.
Ok, that is a nice to have for me. But now I have a situation at which I need it.

My company uses a pug-lintrc for all projects. But some projects changes some rules (for example I want to disable disallowClassAttributeWithStaticValue at a project where I use angular interpolation for class names, see #118 ).

So I added this at Gruntfile:

puglint: {
  options: {
    extends: `.pug-lintrc`,
    disallowClassAttributeWithStaticValue: false
  }
}

But now I get the error: disallowClassAttributeWithStaticValue option requires a true value or should be removed

When you really want to have that behavior, can you add an option to disable it?

Thank you

@mrmlnc
Copy link
Contributor

mrmlnc commented Oct 19, 2016

You can specifically disable any rule by omitting it from your .pug-lintrc config file or by assigning it to null, like so:

https://github.com/pugjs/pug-lint#rules

@Ulrikop
Copy link
Author

Ulrikop commented Oct 19, 2016

wow, that was a fast answer.

Thank you, it works.

@TimothyGu
Copy link
Member

Duplicate of #102 (and see @mrmlnc's answer)

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