Reports irregular whitespace characters that can cause issues with code parsing and display.
✅ This rule is included in the ts logical presets.
Irregular whitespace characters are Unicode characters that look like regular spaces but may be interpreted differently by tools and parsers.
These include non-breaking spaces (\u00A0), zero-width spaces (\u200B), and various other Unicode space characters.
They are often accidentally introduced through copy-paste from external sources such as word processors, web pages, or PDFs.
When present in code, they can cause confusing syntax errors, unexpected behavior in string comparisons, or display issues across different editors.
If your codebase intentionally uses irregular whitespace characters for specific purposes, such as matching text that contains non-breaking spaces, you may want to disable this rule or configure the skip options.
You might also disable this rule if you have other tools in your workflow that already normalize whitespace characters.