@typescript-eslint/internal/plugin-test-formatting too strict about snapshot indentation #4911
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
tests
anything to do with testing
Complained in #4901 (comment)
Take this code for example (from that PR):
The test fails, suggesting that:
Okay, let's try another way by indenting everything—maybe it will be dedented? (Spoiler: I don't know how the snapshot works.)
o_o
It turns out the only way to work around it is by either fighting the linter and adding ignore comments, or by using
.trimEnd()
to each snapshot.I think it's fine for the snapshots to be formatted nicely, so what about a sanitation step that removes all extraneous indentation, or removes trailing spaces (like
.trimEnd()
)? I think ESLint's tests does that.The text was updated successfully, but these errors were encountered: