Skip to content

eslint/unicode-bom Restriction

🛠️ An auto-fix is available for this rule.

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;

References

Released under the MIT License.