Skip to content
Permalink
Browse files

fix(linter): don't pass --color to linters that don't support it

Add the flag directly to the NPM script call

ISSUES CLOSED: electron-userland/electron-forge-templates#48
  • Loading branch information
malept committed Sep 9, 2017
1 parent bb4c787 commit 66354fb6a514b14e4253a2692255d858f5495d62
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/api/lint.js
  2. +1 −1 src/init/init-npm.js
@@ -39,9 +39,9 @@ export default async (providedOptions = {}) => {
throw 'Failed to locate lintable Electron application';
}

d('executing "run lint -- --color" in dir:', dir);
d('executing "run lint" in dir:', dir);
try {
await yarnOrNpmSpawn(['run', 'lint', '--', '--color'], {
await yarnOrNpmSpawn(['run', 'lint'], {
stdio: process.platform === 'win32' ? 'inherit' : 'pipe',
cwd: dir,
});
@@ -31,7 +31,7 @@ export default async (dir, lintStyle) => {
packageJSON.scripts.lint = 'standard';
break;
case 'airbnb':
packageJSON.scripts.lint = 'eslint src';
packageJSON.scripts.lint = 'eslint src --color';
break;
default:
packageJSON.scripts.lint = 'echo "No linting configured"';

0 comments on commit 66354fb

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