Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#31493 closed Cleanup/optimization (fixed)

Replace var usage with const and let keywords in JavaScript.

Reported by: Jon Dufresne Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Adam Johnson Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Change History (9)

comment:2 by Adam Johnson, 4 years ago

Cc: Adam Johnson added
Triage Stage: UnreviewedAccepted

comment:3 by Adam Johnson, 4 years ago

Additionally, whilst we don't officially support IE11 since that commit, https://caniuse.com/#search=const and https://caniuse.com/#search=let show it has support with only caveats for loops, so I expect most things should continue to function there.

comment:4 by Carlton Gibson <carlton@…>, 4 years ago

Resolution: fixed
Status: newclosed

In 5d37cc70:

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.

comment:5 by Carlton Gibson <carlton@…>, 4 years ago

In 7271c8de:

Refs #31493 -- Changed IIFE to ES6 blocks.

comment:6 by Carlton Gibson <carlton@…>, 4 years ago

In 2afa61e:

Refs #31493 -- Replaced var with const/let in documentation JS.

comment:7 by Carlton Gibson <carlton.gibson@…>, 4 years ago

In 6ed4a9b:

[3.1.x] Refs #31493 -- Replaced var with const/let in documentation JS.

Backport of 2afa61e7d99b2ff2656dc64b6e28db88baf786a4 from master

comment:8 by Carlton Gibson <carlton.gibson@…>, 4 years ago

In af2e95b0:

[3.0.x] Refs #31493 -- Replaced var with const/let in documentation JS.

Backport of 2afa61e7d99b2ff2656dc64b6e28db88baf786a4 from master

Co-authored-by: Carlton Gibson <carlton.gibson@…>

comment:9 by GitHub <noreply@…>, 4 years ago

In b23216d:

Refs #31493 -- Replaced var with const and let in JavaScriptCatalog template.

Note: See TracTickets for help on using tickets.
Back to Top