no-irregular-whitespace
Configuration
rslint.config.ts
Rule Details
Disallows irregular whitespace characters outside of strings, comments, regular expressions, and template literals. Irregular whitespace characters can cause issues with various parsers and can be difficult to debug.
The following characters are considered irregular whitespace:
\u000B- Line Tabulation\u000C- Form Feed\u0085- Next Line\u00A0- No-Break Space\u1680- Ogham Space Mark\u180E- Mongolian Vowel Separator\u2000- En Quad through\u200B- Zero Width Space\u202F- Narrow No-Break Space\u205F- Medium Mathematical Space\u3000- Ideographic Space\uFEFF- Zero Width No-Break Space (BOM)\u2028- Line Separator\u2029- Paragraph Separator
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Examples of correct code for this rule with { "skipStrings": true } (default):
Examples of correct code for this rule with { "skipComments": true }:
Examples of correct code for this rule with { "skipTemplates": true }: