From 2a7d1557f97dae5b5fe92567a849167214333eec Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 2 Oct 2020 13:04:10 +0200 Subject: [PATCH] Enable the ESLint `no-var` rule in the `src/shared/` folder Previously this rule has been enabled in the `web/` folder, and in select files in the `src/` sub-folders. In this case, enabling of this rule didn't actually require any further code changes. Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-var --- src/shared/.eslintrc | 10 ++++++++++ src/shared/compatibility.js | 1 - src/shared/message_handler.js | 1 - src/shared/util.js | 1 - 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/shared/.eslintrc diff --git a/src/shared/.eslintrc b/src/shared/.eslintrc new file mode 100644 index 0000000000000..ab1c5afdfd0d4 --- /dev/null +++ b/src/shared/.eslintrc @@ -0,0 +1,10 @@ +{ + "extends": [ + "../../.eslintrc" + ], + + "rules": { + // ECMAScript 6 + "no-var": "error", + }, +} diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index 044997400c98a..8a258fcd32f8a 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import { isNodeJS } from "./is_node.js"; diff --git a/src/shared/message_handler.js b/src/shared/message_handler.js index 0be2961eca47a..9f65d0c0a5190 100644 --- a/src/shared/message_handler.js +++ b/src/shared/message_handler.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error, prefer-const: error */ import { AbortException, diff --git a/src/shared/util.js b/src/shared/util.js index af3be187325ff..9b2b0edf11922 100644 --- a/src/shared/util.js +++ b/src/shared/util.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* eslint no-var: error */ import "./compatibility.js";