Skip to content
Permalink
Browse files

Chore: add autofix npm script (#12330)

  • Loading branch information
kaicataldo authored and mysticatea committed Sep 29, 2019
1 parent 04b6adb commit 160b7c46b556ccb6023eb411a8be8801a4bda6df
Showing with 3 additions and 2 deletions.
  1. +2 −2 Makefile.js
  2. +1 −0 package.json
@@ -473,12 +473,12 @@ target.all = function() {
target.test();
};

target.lint = function() {
target.lint = function([fix = false] = []) {
let errors = 0,
lastReturn;

echo("Validating JavaScript files");
lastReturn = exec(`${ESLINT} .`);
lastReturn = exec(`${ESLINT}${fix ? "--fix" : ""} .`);
if (lastReturn.code !== 0) {
errors++;
}
@@ -10,6 +10,7 @@
"scripts": {
"test": "node Makefile.js test",
"lint": "node Makefile.js lint",
"fix": "node Makefile.js lint -- fix",
"fuzz": "node Makefile.js fuzz",
"generate-release": "node Makefile.js generateRelease",
"generate-alpharelease": "node Makefile.js generatePrerelease -- alpha",

0 comments on commit 160b7c4

Please sign in to comment.
You can’t perform that action at this time.