From eb015ca023d5157efc84802e80e80aafff2e957c Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 24 Jan 2021 11:20:59 +0100 Subject: [PATCH] Update the ESLint `env` to use "es2021" Currently this is inconsistent, since we're using ECMAScript 2021 in the parser options. --- .eslintrc | 2 +- src/scripting_api/app.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.eslintrc b/.eslintrc index 55a4ff50c..15643b2a5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -18,7 +18,7 @@ "env": { "browser": true, - "es2020": true, + "es2021": true, "worker": true, "amd": true, }, diff --git a/src/scripting_api/app.js b/src/scripting_api/app.js index 4b6268514..ddc0682ca 100644 --- a/src/scripting_api/app.js +++ b/src/scripting_api/app.js @@ -51,15 +51,12 @@ class App extends PDFObject { ); this._timeoutIds = new WeakMap(); - // eslint-disable-next-line no-undef if (typeof FinalizationRegistry !== "undefined") { // About setTimeOut/setInterval return values (specs): // The return value of this method must be held in a // JavaScript variable. // Otherwise, the timeout object is subject to garbage-collection, // which would cause the clock to stop. - - // eslint-disable-next-line no-undef this._timeoutIdsRegistry = new FinalizationRegistry( this._cleanTimeout.bind(this) );