diff --git a/.hela.config.js b/.hela.config.js index d65525b..71c61ac 100644 --- a/.hela.config.js +++ b/.hela.config.js @@ -4,5 +4,3 @@ const helaDev = require('@hela/dev'); Object.assign(exports, helaDev); exports.eslint = require('@hela/eslint').helaCommand(); - -const foo = 123; diff --git a/package.json b/package.json index cb2d1ff..babba9f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "hela": "./.hela.config.js", "husky": { "hooks": { - "pre-commit": "lint-staged" + "pre-commit": "lint-staged --debug" } }, "lint-staged": { diff --git a/packages/eslint/src/index.js b/packages/eslint/src/index.js index 2b90e55..3b7ae0e 100644 --- a/packages/eslint/src/index.js +++ b/packages/eslint/src/index.js @@ -27,7 +27,6 @@ function wrapper(prog) { const files = args.slice(0, -2); const argv = args[args.length - 2]; // const opts = args[args.length - 1]; - console.log(args); if (argv.init) { const rootLintConfigFile = path.join( @@ -104,6 +103,11 @@ function wrapper(prog) { console.log(''); console.log(`${report.errorCount} error(s) ${warnings}found.`); // formatCodeframe(report, true); + + if (report.errorCount > 0) { + // eslint-disable-next-line unicorn/no-process-exit + process.exit(1); + } }); }