From 3155301bb9ab8e094f082e932f8f85d028a5b2f4 Mon Sep 17 00:00:00 2001 From: Oliver Blanthorn Date: Fri, 19 Jun 2020 13:31:00 +0100 Subject: [PATCH] Re-enable `unbound-method` --- .eslintrc.js | 2 +- src/content/controller_content.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0471ce29..dd119142 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -153,7 +153,7 @@ module.exports = { } ], "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unbound-method": "off", //"error", + "@typescript-eslint/unbound-method": "error", "@typescript-eslint/unified-signatures": "error", "arrow-body-style": "error", "arrow-parens": [ diff --git a/src/content/controller_content.ts b/src/content/controller_content.ts index f081e55d..a33ab995 100644 --- a/src/content/controller_content.ts +++ b/src/content/controller_content.ts @@ -62,12 +62,12 @@ class KeyCanceller { this.keyUp.push(ke) } - cancelKeyPress(ke: KeyboardEvent) { + public cancelKeyPress = (ke: KeyboardEvent) => { if (!ke.isTrusted) return this.cancelKey(ke, this.keyPress) } - cancelKeyUp(ke: KeyboardEvent) { + public cancelKeyUp = (ke: KeyboardEvent) => { if (!ke.isTrusted) return this.cancelKey(ke, this.keyUp) }