noIrregularWhitespace
¥Summary
-
规则生效日期:
v1.9.0¥Rule available since:
v1.9.0 -
诊断类别:
lint/suspicious/noIrregularWhitespace¥Diagnostic Category:
lint/suspicious/noIrregularWhitespace -
此规则为推荐规则,默认启用。
¥This rule is recommended, which means is enabled by default.
-
此规则没有修复方案。
¥This rule doesn’t have a fix.
-
此规则的默认严重级别为 warning。
¥The default severity of this rule is warning.
-
来源:
¥Sources:
-
¥Same as
no-irregular-whitespace
-
¥How to configure
{ "linter": { "rules": { "suspicious": { "noIrregularWhitespace": "error" } } }}¥Description
禁止使用不规则的空格字符。
¥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
letcount;code-block.js:1:4 lint/suspicious/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.
let foo;code-block.js:1:4 lint/suspicious/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
const count = 1;const foo = '';¥Related links
¥Summary
-
规则生效日期:
v1.9.0¥Rule available since:
v1.9.0 -
诊断类别:
lint/suspicious/noIrregularWhitespace¥Diagnostic Category:
lint/suspicious/noIrregularWhitespace -
此规则为推荐规则,默认启用。
¥This rule is recommended, which means is enabled by default.
-
此规则没有修复方案。
¥This rule doesn’t have a fix.
-
此规则的默认严重级别为 warning。
¥The default severity of this rule is warning.
-
来源:
¥Sources:
-
¥Same as
no-irregular-whitespace
-
¥How to configure
{ "linter": { "rules": { "suspicious": { "noIrregularWhitespace": "error" } } }}¥Description
禁止使用不规则的空格字符。
¥Disallows the use of irregular whitespace characters.
使用不规则空格会导致无法选择正确的目标。
¥Using irregular whitespace would lead to the failure of selecting the correct target.
¥Examples
¥Invalid
.firstClass.secondClass { color: red;}code-block.css:1:12 lint/suspicious/noIrregularWhitespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Irregular whitespace found.
> 1 │ .firstClass␋.secondClass {
│ ^
2 │ color: red;
3 │ }
ℹ Replace the irregular whitespace with normal whitespaces.
¥Valid
.firstClass .secondClass { color: red;}¥Related links
Biome v2.1 中文网 - 粤ICP备13048890号