Skip to content

Commit

Permalink
fix(linter): don't pass --color to linters that don't support it
Browse files Browse the repository at this point in the history
Add the flag directly to the NPM script call

ISSUES CLOSED: electron-userland/electron-forge-templates#48
  • Loading branch information
malept committed Sep 10, 2017
1 parent bb4c787 commit 66354fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
2 changes: 1 addition & 1 deletion src/init/init-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"';
Expand Down

0 comments on commit 66354fb

Please sign in to comment.