mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Update gulp lint
to support passing of the --fix
argument on the command line
*I've had this patch locally for awhile, but have apparently missed to upstream it.* This simplifies enabling of new ESLint rules, since most of them support automatic fixing of errors, without having to edit `gulpfile.js` or manually invoke ESLint directly.
This commit is contained in:
parent
64351caf1f
commit
1c76ef7888
1 changed files with 3 additions and 0 deletions
|
@ -1401,6 +1401,9 @@ gulp.task("lint", function(done) {
|
|||
".",
|
||||
"--report-unused-disable-directives",
|
||||
];
|
||||
if (process.argv.includes("--fix")) {
|
||||
options.push("--fix");
|
||||
}
|
||||
var esLintProcess = startNode(options, { stdio: "inherit" });
|
||||
esLintProcess.on("close", function(code) {
|
||||
if (code !== 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue