Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule proposal: unicode-bom (byte order mark, U+FEFF)

See original GitHub issue

When 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:closed
  • Created 8 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

platinumazurecommented, Apr 11, 2016

To confirm, we’ll be implementing unicode-bom with always/never, not no-bom with no option, correct?

If so, can someone please change the title of this issue accordingly? Thanks!

nzakascommented, Mar 10, 2016

Sounds like @mysticatea is championing this rule.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found