Skip to content

noIrregularWhitespace

Diagnostic Category: lint/nursery/noIrregularWhitespace

Since: vnext

Sources:

Disallows the use of irregular whitespace characters.

Invalid or irregular whitespace causes issues with various parsers and also makes code harder to debug.

let count;
code-block.js:1:4 lint/nursery/noIrregularWhitespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Irregular whitespaces found.

> 1 │ letcount;
^
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/nursery/noIrregularWhitespace ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Irregular whitespaces found.

> 1 │ letfoo;
^
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.

const count = 1;
const foo = ' ';