Skip to content

Commit 99e674a

Browse files
authored
Merge pull request #5968 from plotly/eslint-v7-api-no-deprecated
Migrating from eslint-v6 API to eslint-v7 API
2 parents 6cc0165 + 174d39d commit 99e674a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tasks/no_es6_dist.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ assertES5();
88

99
// Ensure no ES6 has snuck through into the build:
1010
function assertES5() {
11-
var CLIEngine = eslint.CLIEngine;
11+
var ESLint = eslint.ESLint;
1212

13-
var cli = new CLIEngine({
13+
var cli = new ESLint({
1414
allowInlineConfig: false,
1515
useEslintrc: false,
1616
ignore: false,
17-
parserOptions: {
18-
ecmaVersion: 5
17+
overrideConfig: {
18+
parserOptions: {
19+
ecmaVersion: 5
20+
}
1921
}
2022
});
2123

2224
var files = partialBundlePaths.map(function(f) { return f.dist; });
2325
files.unshift(constants.pathToPlotlyDist);
2426

25-
var report = cli.executeOnFiles(files);
26-
var formatter = cli.getFormatter();
27+
var report = cli.lintFiles(files);
28+
var formatter = cli.loadFormatter();
2729

2830
var errors = [];
2931
if(report.errorCount > 0) {

0 commit comments

Comments
 (0)