pugjs / pug-lint

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

Add support of Array of allowed uppercase tags for requireLowerCaseAttributes #108

Open jaro-shell opened 8 years ago

jaro-shell commented 8 years ago

When setting:

{ "requireLowerCaseAttributes" : true }

it would be great to allow passing Array of allowed tags containing uppercase characters (exceptions). For example: viewBox should be allowed for svg

jackbrewer commented 8 years ago

I've just run into the same issue. Found a list of what I assume is all available SVG elements on MDN: https://developer.mozilla.org/en-US/docs/Web/SVG/Element. There are ~35 elements which need to be written as camel-cased.

Personal opinion would be that pug-lint should whitelist these automatically, or if possible, ignore camel-cased elements which are within an SVG element.

I assume whatever happens to update this rule will also need to apply to the requireLowerCaseAttributes rule too: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute

in-in commented 7 years ago

Are there any workarounds until the problem is resolved?