summaryrefslogtreecommitdiff
path: root/.eslintrc
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-04-20 17:39:15 -0700
committerCarlton Gibson <carlton@noumenal.es>2020-04-29 10:22:41 +0200
commit5d37cc703b2d3f100ca5c2c73fd456739cd80dd9 (patch)
tree6e70b9947bee40969547578b4d07dd18517ca506 /.eslintrc
parent0dafadadb924e09ffd43287604cb4c2c6e353891 (diff)
downloaddjango-5d37cc703b2d3f100ca5c2c73fd456739cd80dd9.tar.gz
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.
Diffstat (limited to '.eslintrc')
-rw-r--r--.eslintrc5
1 files changed, 4 insertions, 1 deletions
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