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.
Options
Section titled “Options”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.
Example
Section titled “Example”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.mddocs/with_bom.md# hi<U+FEFF># hiWith this .alint.yml:
version: 1rules: - id: no-bom kind: no_bom paths: "docs/**/*.md" level: warningalint check reports:
--- docs/with_bom.md ----------------------------------------------------------- ! warning no-bom 1:1 file begins with a UTF-8 BOM
Summary (1 violation): ! 1 warning 0 passing * 1 failingMarkdown 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.mddocs/b.md# hicontentWith this .alint.yml:
version: 1rules: - id: no-bom kind: no_bom paths: "docs/**/*.md" level: warningalint check reports:
v All 1 rule(s) passed.