Skip to content

Rule to check indent level of tags #1789

@KyleHorkley

Description

@KyleHorkley

Is your feature request related to a problem? Please describe.
It would be great to have a feature that allows for checking the indent level of tags to ensure that their nesting is properly shown with the correct indentation (i.e. number of spaces or tabs), configurable to a certain number of spaces or a tab as the indent.

Describe the solution you'd like
For example, incorrect code with this rule may look like:

<ul>
<li> <!-- Not indented from parent -->
    <p>Hello world</p>
</li> <!-- Not indented from parent -->
</ul>

or, in the case of a set number of spaces (e.g. 4):

<ul>
    <li>
         <p>Hello world</p> <!-- Error: 9 spaces, expected 8 -->
   </li> <!-- Error: 3 spaces, expected 4 -->
</ul>

Describe alternatives you've considered
Issues #73 and #153 were closed due to inactivity, but this feature is still relevant and would be incredibly useful to ensure that proper tag nesting is reflected through consistent indentation.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions