From f393ee0c6cf0a9d4b676434b8d1229f508ff8df9 Mon Sep 17 00:00:00 2001 From: Erek Speed Date: Thu, 6 May 2021 14:06:42 +0900 Subject: [PATCH] chore(build): Encode all files consistently as UTF-8 and add linter rule to enforce it. BOM markers were breaking chrome unpacked extension loading because webpack never adds BOM markers by default. Fixes #455 TESTED=Built and packaged in chrome with no problems. --- .eslintrc.json | 1 + extension/data.ts | 2 +- extension/rikaichan.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index d0f9280fc..2a0858257 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -20,6 +20,7 @@ "sort-imports-es6-autofix/sort-imports-es6": "error", "node/no-unpublished-import": "off", "@typescript-eslint/no-var-requires": "off", + "unicode-bom": "error", // TODO(espeed): Remove these and fix errors. "no-undef": "off", "prefer-arrow-callback": "off", diff --git a/extension/data.ts b/extension/data.ts index a1f0d1c9e..f1bd2b0fa 100644 --- a/extension/data.ts +++ b/extension/data.ts @@ -1,4 +1,4 @@ -/* +/* Rikaikun Copyright (C) 2010 Erek Speed diff --git a/extension/rikaichan.ts b/extension/rikaichan.ts index 1d10ce988..5062440c2 100644 --- a/extension/rikaichan.ts +++ b/extension/rikaichan.ts @@ -1,4 +1,4 @@ -/* +/* Rikaikun Copyright (C) 2010 Erek Speed