From 7dc9fda24155c1cfccc1b218d09abe71d4483848 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 21 Sep 2021 09:56:52 +0200 Subject: [PATCH] eslint: Enable no-var rule `var` has broken/unexpected scoping in JavaScript, and can lead to subtle errors. It's preferable and safer to use `const` whenever possible, and `let` where necessary. There are no usages of `var` in starter-kit right now, so just enable the rule to ensure that it stays that way. --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index 4572422..eaa27d8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,6 +23,7 @@ "ignoredNodes": [ "JSXAttribute" ] }], "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }], + "no-var": "error", "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }], "prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }], "react/jsx-indent": ["error", 4],