pageClass | sidebarDepth | title | description | since |
---|---|---|---|---|
rule-details |
0 |
svelte/no-trailing-spaces |
disallow trailing whitespace at the end of lines |
v2.7.0 |
disallow trailing whitespace at the end of lines
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
This rule extends the base ESLint's no-trailing-spaces rule. The no-trailing-spaces rule does not understand HTML comments and will report trailing whitespace in HTML comments when using ignoreComments
option.
This rule supports HTML comments generated by svelte-eslint-parser.
<script>
/* eslint svelte/no-trailing-spaces: "error" */
/* ✓ GOOD */
var foo = 0;
/* ✗ BAD */
var foo = 0;
</script>
<!-- ✓ GOOD -->
<div>
Text
</div>
<!-- ✗ BAD -->
<div>
Text
</div>
skipBlankLines
... Iftrue
, allows trailing whitespace on empty lines.ignoreComments
... Iftrue
, allows trailing whitespace in comments.
Same as no-trailing-spaces rule option. See here for details.
This rule was introduced in eslint-plugin-svelte v2.7.0
Taken with ❤️ from ESLint core