Skip to content

no_bom

Flag a leading UTF-8 / UTF-16 LE/BE / UTF-32 LE/BE byte-order mark. The fixer strips whichever BOM is detected.


This rule takes no kind-specific options.

Plus the common paths, level, id, and when fields. This table is generated from the JSON Schema; option types and defaults are authoritative.

A Markdown file that opens with a UTF-8 byte-order mark

Section titled “A Markdown file that opens with a UTF-8 byte-order mark”

The rule fires on this repository:

docs/
docs/clean.md
docs/with_bom.md
docs/clean.md
# hi
docs/with_bom.md
<U+FEFF># hi

With this .alint.yml:

version: 1
rules:
- id: no-bom
kind: no_bom
paths: "docs/**/*.md"
level: warning

alint check reports:

Terminal window
--- docs/with_bom.md -----------------------------------------------------------
! warning no-bom
1:1 file begins with a UTF-8 BOM
Summary (1 violation):
! 1 warning
0 passing * 1 failing

Markdown files saved as plain UTF-8 with no BOM

Section titled “Markdown files saved as plain UTF-8 with no BOM”

This repository is compliant:

docs/
docs/a.md
docs/b.md
docs/a.md
# hi
docs/b.md
content

With this .alint.yml:

version: 1
rules:
- id: no-bom
kind: no_bom
paths: "docs/**/*.md"
level: warning

alint check reports:

Terminal window
v All 1 rule(s) passed.