Closed
Description
It would be nice to include this as a test step. A quick script:
var CLIEngine = require("eslint").CLIEngine;
var cli = new CLIEngine({
envs: ["browser", "mocha"], // ??? just copied it. not sure what this does.
useEslintrc: false,
ignore: false,
parserOptions: {
ecmaVersion: 5
}
});
var report = cli.executeOnFiles(["dist/plotly.js"]);
var formatter = cli.getFormatter();
console.log(formatter(report.results));
if (report.errorCount > 0) {
process.exit(1);
}
Running this on 1.25.1 gives:
$ node es5only.js
/Users/rreusser/plotly/plotly.js/dist/plotly.js
7:1 error Parsing error: The keyword 'const' is reserved
✖ 1 problem (1 error, 0 warnings)
Remaining tasks:
- find the right place for it (tasks?)
- fix the ignore details. Right now it uses eslintignore which excludes everything we want to include. We either need to grab the directory listing and filter out
/\.min\.js$
manually or figure out the right incantation. Should be simple.
Metadata
Metadata
Assignees
Labels
No labels