noIrregularWhitespace
诊断类别:lint/nursery/noIrregularWhitespace
¥Diagnostic Category: lint/nursery/noIrregularWhitespace
自从:v1.9.0
¥Since: v1.9.0
来源:
¥Sources:
-
与以下相同:
no-irregular-whitespace
¥Same as:
no-irregular-whitespace
禁止使用不规则的空格字符。
¥Disallows the use of irregular whitespace characters.
无效或不规则的空格会导致各种解析器出现问题,也会使代码更难调试。
¥Invalid or irregular whitespace causes issues with various parsers and also makes code harder to debug.
¥Examples
¥Invalid
code-block.js:1:4 lint/nursery/noIrregularWhitespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Irregular whitespaces found.
> 1 │ let␋count;
│ ^
2 │
ℹ Irregular whitespaces can cause issues to other parsers, and make the code harder to debug.
ℹ Replace the irregular whitespaces with normal whitespaces or tabs.
code-block.js:1:4 lint/nursery/noIrregularWhitespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Irregular whitespaces found.
> 1 │ let␠foo;
│ ^
2 │
ℹ Irregular whitespaces can cause issues to other parsers, and make the code harder to debug.
ℹ Replace the irregular whitespaces with normal whitespaces or tabs.
¥Valid
¥Related links
自从:v1.9.9
¥Since: v1.9.9
来源:
¥Sources:
-
与以下相同:
stylelint/no-irregular-whitespace
¥Same as:
stylelint/no-irregular-whitespace
禁止使用不规则的空格字符。
¥Disallows the use of irregular whitespace characters.
使用不规则空格会导致无法选择正确的目标。
¥Using irregular whitespace would lead to the failure of selecting the correct target.
¥Examples
¥Invalid
code-block.css:1:12 lint/nursery/noIrregularWhitespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Irregular whitespace found.
> 1 │ .firstClass␋.secondClass {
│ ^
2 │ color: red;
3 │ }
ℹ Replace the irregular whitespace with normal whitespaces.
code-block.css:2:9 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ The CSS standard only allows tabs, whitespace, carriage return and line feed whitespace.
1 │ .firstClass .secondClass {
> 2 │ color:␋red;
│ ^
3 │ }
4 │
ℹ Use a regular whitespace character instead.
¥Valid
¥Related links