Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation checking #85

Open
OwlyCode opened this issue Oct 19, 2019 · 1 comment
Open

Indentation checking #85

OwlyCode opened this issue Oct 19, 2019 · 1 comment

Comments

@OwlyCode
Copy link
Collaborator

OwlyCode commented Oct 19, 2019

We should create a new rule about indentation checking. The official ruleset states:

Indent your code inside tags (use the same indentation as the one used for the target language of the rendered template)

But I also noticed a lot of people prefer to do:

<ul>
{% for a in 1..2 %}
    <li>{{ a }}</li>
{% endfor %}
</ul>

So the final html is indented as if there were no twig.

My take on this would be to create a rule that defaults to the official coding standard but has an option to tolerate that twig tags directly inside html code can "skip" one indentation level.

@oallain
Copy link
Contributor

oallain commented Oct 19, 2019

Good thing, it's really nice idea 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants