From 1c76ef7888c7a9a888c1af08a6252740c018f82f Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 16 Feb 2020 15:10:28 +0100 Subject: [PATCH] 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. --- gulpfile.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 77a74a170..16760555d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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) {