pugjs / pug-lint

An unopinionated and configurable linter and style checker for Pug
ISC License
228 stars 51 forks source link

Attribute interpolation with disallowing attribute static value #83

Open nikmilson opened 8 years ago

nikmilson commented 8 years ago

Whether interpolating attribute is considered the static value?

For example:

div(id="custom-id-#{name}")

With option disallowIdAttributeWithStaticValue: true is invalid. But id not seems static. Is this correct?

benedfit commented 8 years ago

I'd agree with you that this isn't static, so this will need fixing.

You can get around this issue for now by using div(id="custom-id-" + name), unless of course you have disallowAttributeConcatenation: true in your config too

TimothyGu commented 8 years ago

Depends on the version of Pug. Pug 2 removes support for the interpolation syntax, making it always static. Pug-lint should follow the syntax of well, Pug.