Skip to 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.

// Bad
const name = "Αlice"; // Greek letter A (0x391), which is indistinguishable from a normal A.
// Good
const name = "Alice"; // Normal A
{
"rules": {
"complete/require-ascii": [
"error",
{
"whitelist": []
}
]
}
}