]> git.proxmox.com Git - pve-eslint.git/commitdiff
switch to es2020 for bullseyse
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 9 Jun 2021 09:05:48 +0000 (11:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 9 Jun 2021 09:05:52 +0000 (11:05 +0200)
at least in theory this should be enough

https://eslint.org/docs/user-guide/configuring/language-options#specifying-environments

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/app.js

index 07ba5cb8cc8d676311e41ee1bf34d31b22b7a945..020d552d2c4a6640c2495f79182aea45d8f5c160 100644 (file)
@@ -41,7 +41,7 @@ if (!paths.length) {
 
 const defaultConfig = {
     parserOptions: {
-       ecmaVersion: 2018,
+       ecmaVersion: 2020,
        ecmaFeatures: {
            impliedStrict: true,
        },
@@ -49,7 +49,7 @@ const defaultConfig = {
     env: {
        browser: true,
        node: true,
-       es2017: true,
+       es2020: true, // automatically sets ecmaVersion to 2020 and allows es2020 globals
     },
     globals: {
        Ext: "writable",
@@ -287,10 +287,9 @@ const cli = new eslint.CLIEngine({
 });
 
 const report = cli.executeOnFiles(paths);
+
 let exitcode = 0;
-let files_err = [];
-let files_warn = [];
-let files_ok = [];
+let files_err = [], files_warn = [], files_ok = [];
 let fixes = 0;
 console.log('------------------------------------------------------------');
 report.results.forEach(function(result) {