lint: Make prettier quieter when fixing.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-07-21 16:29:55 -07:00
parent c65729511a
commit 308883302d
1 changed files with 2 additions and 2 deletions

View File

@ -93,9 +93,9 @@ def run() -> None:
linter_config.external_linter('isort', ['isort'], ['py'], linter_config.external_linter('isort', ['isort'], ['py'],
description="Sorts Python import statements", description="Sorts Python import statements",
check_arg=['--check-only', '--diff']) check_arg=['--check-only', '--diff'])
linter_config.external_linter('prettier', ['node_modules/.bin/prettier'], linter_config.external_linter('prettier', ['node_modules/.bin/prettier', '--check'],
['js', 'ts', 'yaml', 'yml'], ['js', 'ts', 'yaml', 'yml'],
check_arg=['--check'], fix_arg=['--write'], fix_arg=['--write'],
description="Formats JavaScript and YAML", description="Formats JavaScript and YAML",
# https://github.com/prettier/prettier/pull/8703 # https://github.com/prettier/prettier/pull/8703
suppress_line=lambda line: line in ["Checking formatting...\n", "All matched files use Prettier code style!\n"]) suppress_line=lambda line: line in ["Checking formatting...\n", "All matched files use Prettier code style!\n"])