lint-all: Fix progress bar from `npm run lint` in linter.

Also fixes printing the `eslint` help output in the event that there
are no files to check.

See https://github.com/zulip/zulip/pull/2246#issuecomment-261673662
for details on the original problem.
This commit is contained in:
Tim Abbott 2016-11-18 16:18:08 -08:00
parent 497c7702cc
commit 2abe11e209
1 changed files with 3 additions and 1 deletions

View File

@ -495,7 +495,9 @@ def run():
@lint
def eslint():
# type: () -> int
result = subprocess.call(['npm', 'run', '--silent', 'lint']
if len(by_lang['js']) == 0:
return 0
result = subprocess.call(['tools/node', 'node_modules/.bin/eslint', '--quiet']
+ by_lang['js'])
return result