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

Accept dynamic values at disallowClassAttributeWithStaticValue #118

Open
Ulrikop opened this issue Oct 19, 2016 · 1 comment
Open

Accept dynamic values at disallowClassAttributeWithStaticValue #118

Ulrikop opened this issue Oct 19, 2016 · 1 comment

Comments

@Ulrikop
Copy link

Ulrikop commented Oct 19, 2016

Hi,
I like the rule "disallowClassAttributeWithStaticValue" because I prefer the smart syntax "element.class". But sometimes I have a dynamic value, then I use the class attribute. For example for a interpolation of angular:

div(class="{{::myClass}}")

Can you add an option to configure allowed things at disallowClassAttributeWithStaticValue?

Thank you

@geersch
Copy link

geersch commented Dec 6, 2016

It would be handy if this rule was still applied by the linter, but allows margin to allow for dynamic values, which you cannot write as a class literal.

For example:

div(class="block-element--{{modifier}}")

I'd rather not completely disable this rule. Maybe a hint to ignore that rule for this element would be handy so that you can exclude it.

lightbringer1991 added a commit to lightbringer1991/pug-lint that referenced this issue Nov 9, 2017
allow class and id literal to allow/ignore certain patterns

Fixes pugjs#118 and pugjs#83 - issue
lightbringer1991 added a commit to lightbringer1991/pug-lint that referenced this issue Nov 9, 2017
allow class and id literal to allow/ignore certain patterns

Closes pugjsgh-140 - pull request
Fixes pugjs#118 and pugjs#83 - issue
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

2 participants