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:
Jonas Jenwald 2020-02-16 15:10:28 +01:00
parent 64351caf1f
commit 1c76ef7888

View File

@ -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) {