BenoitZugmeyer / eslint-plugin-html

An ESLint plugin to extract and lint scripts from HTML files.
ISC License
436 stars 51 forks source link

auto enable report-bad-indent #41

Closed aeosynth closed 7 years ago

aeosynth commented 7 years ago

would it be possible to check for the existence of an html/indent setting, and if so automatically enable html/report-bad-indent? imo the indent setting should exist only to change the severity, not to enable the feature.

edit: or combine the two, eg html/indent: [2, 0]

edit: just make it a rule instead of a setting

BenoitZugmeyer commented 7 years ago

Thank you for your interest. Those options may be a little confusing, but they serve different purposes, and I don't think merging them will help to understand. html/report-bad-indent is useful with or without html/indent:

As for "just" making a rule instead: those settings are used by the parser, way before any rule is triggered. They must be used this way so rules as indent are working out of the box, without having to know if the HTML was indented etc. (rules are executing on pure JS, no HTML code anyway)

Let me know if you think of a better way to document it!