eslint/unicode-bom Restriction
What it does
Require or disallow Unicode byte order mark (BOM)
Why is this bad?
The Unicode Byte Order Mark (BOM) is used to specify whether code units are big endian or little endian. That is, whether the most significant or least significant bytes come first. UTF-8 does not require a BOM because byte ordering does not matter when characters are a single byte. Since UTF-8 is the dominant encoding of the web, we make "never" the default option.
Example
javascript
var a = 123;
How to use
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny unicode-bom
json
{
"rules": {
"unicode-bom": "error"
}
}