airbnb / airbnb/javascript

Explain UTF-8 BOM rule in readme

Open
#1,640 12 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
148k
Forks
26.6k
PR merge metrics
No merged PRs in 30d

Description

Most style decisions are explained in the readme, but I couldn't find the reasoning on why a BOM is considered bad. Where I've looked:

* [the patch](https://github.com/airbnb/javascript/commit/d9cb343b518349982f3b094f2ce48eda8347e6c7) that enabled it, found no commit message body.
* the current code of the rules file, https://github.com/airbnb/javascript/blob/8cf2c70a4164ba2dad9a79e7ac9021d32a406487/packages/eslint-config-airbnb-base/rules/style.js#L472-L474
* [the eslint rule page](https://eslint.org/docs/rules/unicode-bom) mentioned in the patch code comment, doesn't claim it's bad.
* searched the readme for "BOM", "unicode" and "byte order"
* searched issue tracker for "BOM", "unicode" and "byte order"

Could someone explain it, or add search keywords to make the explanation easier to find?

Update: Also, is there a recommendation on how to declare the file encoding instead? I searched the readme for "charset", "encod" and "character set" but no matches.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the README and packages/eslint-config-airbnb-base/rules/style.js around the unicode-bom rule, then review the linked commit and ESLint rule page. Determine what rationale and encoding guidance the documentation should provide, and update the README with searchable terminology once the explanation is established.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.