We are trying to use prettier as part of ESLint, alongside eslint-plugin-html. This seems to generally work, however, it is getting confused with indentation fixes.
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<script>
function test() {
ok(
true,
'Some very very very very very very very very very very very very long line'
);
}
</script>
</body>
</html>
Description
We are trying to use prettier as part of ESLint, alongside eslint-plugin-html. This seems to generally work, however, it is getting confused with indentation fixes.
Setup configuration
Aditional context
Input test.html file:
Run
eslint --fix --ext .html test.html
Result (no changes, just errors raised):
I've seen various combinations of this, using this as the test function:
Results in it split across lines, but the last line indented incorrectly:
I guess that the prettier is somehow defeating eslint-plugin-html's whitespace handling.