Skip to content

Commit 119ead8

Browse files
committed
Escape the BOM literal in assert-strict-json so lint passes
1 parent 5c49129 commit 119ead8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/assert-strict-json.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function walk(dir) {
3535
checked++
3636
// Strip a UTF-8 BOM: Chrome tolerates it in manifests, JSON.parse does
3737
// not, and the reload-harness corpus showed wild files ship it.
38-
const raw = fs.readFileSync(p, 'utf8').replace(/^/, '')
38+
const raw = fs.readFileSync(p, 'utf8').replace(/^\uFEFF/, '')
3939
try {
4040
JSON.parse(raw)
4141
} catch (err) {

0 commit comments

Comments
 (0)