From 174d39d60d5b708730bd9ed99f1fbfe02b2dfae4 Mon Sep 17 00:00:00 2001 From: archmoj Date: Mon, 4 Oct 2021 12:36:40 -0400 Subject: [PATCH] adapt no_es6_dist to eslint v7 --- tasks/no_es6_dist.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tasks/no_es6_dist.js b/tasks/no_es6_dist.js index fbb2d6cae93..bfd00fb8ae5 100644 --- a/tasks/no_es6_dist.js +++ b/tasks/no_es6_dist.js @@ -8,22 +8,24 @@ assertES5(); // Ensure no ES6 has snuck through into the build: function assertES5() { - var CLIEngine = eslint.CLIEngine; + var ESLint = eslint.ESLint; - var cli = new CLIEngine({ + var cli = new ESLint({ allowInlineConfig: false, useEslintrc: false, ignore: false, - parserOptions: { - ecmaVersion: 5 + overrideConfig: { + parserOptions: { + ecmaVersion: 5 + } } }); var files = partialBundlePaths.map(function(f) { return f.dist; }); files.unshift(constants.pathToPlotlyDist); - var report = cli.executeOnFiles(files); - var formatter = cli.getFormatter(); + var report = cli.lintFiles(files); + var formatter = cli.loadFormatter(); var errors = []; if(report.errorCount > 0) {