Skip to main content

complete/require-ascii

πŸ’Ό This rule is enabled in the βœ… recommended config.

πŸ“ Require code and comments to only contain ASCII characters.

βš™οΈ This rule is configurable.

Require code and comments to only contain ASCII characters. If this is too restrictive, you can use the whitelist option to allow specific characters.

Rule Details​

// Bad
const name = "Ξ‘lice"; // Greek letter A (0x391), which is indistinguishable from a normal A.

// Good
const name = "Alice"; // Normal A

Options​

{
"rules": {
"complete/require-ascii": [
"error",
{
"whitelist": []
}
]
}
}

Resources​