From 5d37cc703b2d3f100ca5c2c73fd456739cd80dd9 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 20 Apr 2020 17:39:15 -0700 Subject: Fixed #31493 -- Replaced var with const and let keywords in JavaScript. The eslint configuration and the admin script compress.py have been updated for ES6. The unused fallback of globals.django in jquery.init.js was removed. It is always included before jsi18n-mocks.test.js and it always sets the global value. --- .eslintrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.eslintrc') diff --git a/.eslintrc b/.eslintrc index b02487d913..46ef3fe926 100644 --- a/.eslintrc +++ b/.eslintrc @@ -16,8 +16,10 @@ "no-unused-vars": ["error", {"vars": "local", "args": "none"}], "no-script-url": ["error"], "no-shadow": ["error", {"hoist": "functions"}], + "no-var": ["error"], "quotes": ["off", "single"], "linebreak-style": ["error", "unix"], + "prefer-const": ["error"], "semi": ["error", "always"], "space-before-blocks": ["error", "always"], "space-before-function-paren": ["error", {"anonymous": "never", "named": "never"}], @@ -25,7 +27,8 @@ "strict": ["warn", "function"] }, "env": { - "browser": true + "browser": true, + "es6": true }, "globals": { "django": false -- cgit v1.3