Skip to content

eslint/no-irregular-whitespace Correctness

This rule is turned on by default.

What it does

Disallows the use of irregular whitespaces in the code.

Why is this bad

The use of irregular whitespaces can hinder code readability and create inconsistencies, making maintenance and collaboration more challenging.

Example

javascript
function invalidExample() {
  return 42;
}

How to use

To enable this rule in the CLI or using the config file, you can use:

bash
oxlint --deny no-irregular-whitespace
json
{
  "rules": {
    "no-irregular-whitespace": "error"
  }
}

References

Released under the MIT License.