prettier-eslint
prettier-eslint copied to clipboard
indentation in HTML file not working
Versions:
prettier-eslintversion: 12.0.0nodeversion: v12.22.6npm(oryarn) version: 6.14.15
Have you followed the debugging tips?
Yes
Relevant code or config
<body>
<script>
const text = 'very ... very long text';
</script>
...
</body>
What I did:
using the rule:
"operator-linebreak": [
"error",
"before"
]
eslint.js --fix file.html
What happened:
The text was formatted as:
<body>
<script>
const text
= 'very ... very long text';
</script>
...
</body>
but I expected it to be indented as in:
<body>
<script>
const text
= 'very ... very long text';
</script>
...
</body>
Problem description:
Indentation doesn't seem to work. I believe this is limited to the situations when the Javascript is embedded in a HTML file and it works correctly in a .js file.
Suggested solution:
The HTML indentation should be taken into account.