Rule proposal: unicode-bom (byte order mark, U+FEFF)
See original GitHub issueWhen does this rule warn?
When there is a BOM in a file checked by ESLint. This has happened to me after inheriting some code. My editor (atom) doesn’t show the mark, but I see it on git diff
.
Is this rule preventing an error or is it stylistic? Stylistic
Why is this rule a candidate for inclusion instead of creating a custom rule? I believe this rule is related to whitespace rules, which are in the ESLint core already.
Are you willing to create the rule yourself? Yes, though I am not sure how to, yet.
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
The byte-order mark (BOM) in HTML - W3C
The name BYTE ORDER MARK is an alias for the original character name ZERO WIDTH NO-BREAK SPACE (ZWNBSP). With the introduction of U+2060...
Read more >Byte order mark - Wikipedia
The byte order mark (BOM) is a particular usage of the special Unicode character, U+FEFF BYTE ORDER MARK, whose appearance as a magic...
Read more >unicode-bom - ESLint - Pluggable JavaScript Linter
The Unicode Byte Order Mark (BOM) is used to specify whether code units are big endian or little endian. That is, whether the...
Read more >Unicode Byte Order Mark (BOM) as a python constant?
It's not a real problem in practice, since I can just write BOM = "\uFEFF" ; but it bugs me that I have...
Read more >ByteOrderMark - Source code
Locale; 021 022/** 023 * Byte Order Mark (BOM) representation - see {@link ... 0xFF, 0xFE, 0x00, 0x00); 057 058 /** 059 *...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To confirm, we’ll be implementing
unicode-bom
with always/never, notno-bom
with no option, correct?If so, can someone please change the title of this issue accordingly? Thanks!
Sounds like @mysticatea is championing this rule.