Use a linter that detects formatting errors in your [component-name].html.twig files.

The linter will ignore all Twig variables and expressions and will only lint the HTML from the template.

You can configure the rules that the tool uses by overwriting the gulpfile.js/options/htmlhintrc.js file. The defaults and the format of the rules can be found on a Github repository page of the HTMLHint tool.