When using PHPCS with the Generic.WhiteSpace.ScopeIndent sniff, it tries to indent code to the level of the opening tag.
Take this example for instance (from a Wordpress plugin):
<p class="description"><?php esc_html_e(
'Stuff here',
'plugin'
) ?></p>
It wants me to align the closing line with the beginning of the open tag, which in this case would amount to a 23-character indent.
I don't want that: I'd rather style it like above. But I can't figure out how to disable this without disabling the entire sniff.
I could of course move the opening tag to the next line but I'd like to find a way around this without always needing to do that, as I prefer not to have superfluous spacing in the HTML.
question from:
https://stackoverflow.com/questions/65931803/do-not-indent-to-opening-tag-when-in-inline-html 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…