schorfES / node-lintspaces

A validator for checking different kinds of whitespaces in your files.
https://npmjs.com/package/lintspaces
MIT License
30 stars 17 forks source link

indent tags, not attributes, for html files #23

Closed mlarcher closed 8 years ago

mlarcher commented 9 years ago

When dealing with html files, it's often useful to align the attributes of a given tag together. As the tag name vary in length, this implies that the lines beginning with an attribute will not comply with the indentation setting. This is usually handled by editorconfig based plugins, but is treated as an error by gulp-lintspaces.

schorfES commented 9 years ago

Have you tried to specify your own regular expression to ignore specific lines?

mlarcher commented 9 years ago

Let me answer your question with another question, if I may: is it possible to specify an "ignore" regular expression that would only apply to a particular type of file ? (i.e. html files only for instance)

schorfES commented 8 years ago

The node lintspaces validator only runs agains a single file when calling validate(). So you may change your settings depending on filetype or create a new instance of the validator.