From 2bdf2627afa2b1ef721b77f0f491ab563c8378b7 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Tue, 13 Jul 2021 23:54:36 +0100 Subject: [PATCH] Configure eslint and Closure Compiler to accept ES6 --- .eslintrc.json | 1 + scripts/gulpfiles/build_tasks.js | 1 + 2 files changed, 2 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index 0d5daf79c..9d74291da 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -75,6 +75,7 @@ }] }, "env": { + "es6": true, "browser": true }, "globals": { diff --git a/scripts/gulpfiles/build_tasks.js b/scripts/gulpfiles/build_tasks.js index 3aaa4ac04..e6f496544 100644 --- a/scripts/gulpfiles/build_tasks.js +++ b/scripts/gulpfiles/build_tasks.js @@ -118,6 +118,7 @@ function compile(compilerOptions, opt_verbose, opt_warnings_as_error, const options = {}; options.compilation_level = 'SIMPLE_OPTIMIZATIONS'; options.warning_level = opt_verbose ? 'VERBOSE' : 'DEFAULT'; + options.language_in = 'ECMASCRIPT6_STRICT', options.language_out = 'ECMASCRIPT5_STRICT'; options.rewrite_polyfills = false; options.hide_warnings_for = 'node_modules';