From 57f2b8760a38a59704aa0133a6ea6a14cbbd215d Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 13 Feb 2021 20:01:20 -0800 Subject: [PATCH] shared: Format our one Flow file with Prettier. Why not. Signed-off-by: Anders Kaseorg --- static/shared/js/typing_status.js.flow | 10 +++++----- tools/lint | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/static/shared/js/typing_status.js.flow b/static/shared/js/typing_status.js.flow index 01a259a876..82d1a11f7b 100644 --- a/static/shared/js/typing_status.js.flow +++ b/static/shared/js/typing_status.js.flow @@ -7,12 +7,12 @@ type RecipientUserIds = $ReadOnlyArray; type Worker = {| - get_current_time: () => number, // as ms since epoch - notify_server_start: RecipientUserIds => void, - notify_server_stop: RecipientUserIds => void + get_current_time: () => number, // as ms since epoch + notify_server_start: (RecipientUserIds) => void, + notify_server_stop: (RecipientUserIds) => void, |}; declare export function update( - worker: Worker, - new_recipient: RecipientUserIds | null + worker: Worker, + new_recipient: RecipientUserIds | null, ): void; diff --git a/tools/lint b/tools/lint index 7c639df415..6f982c05f9 100755 --- a/tools/lint +++ b/tools/lint @@ -43,7 +43,7 @@ def run() -> None: by_lang = linter_config.list_files( groups={ "backend": ["py", "sh", "pp", "json", "md", "txt", "text", "yaml", "rst", "yml"], - "frontend": ["js", "ts", "css", "hbs", "html", "lock"], + "frontend": ["js", "ts", "flow", "css", "hbs", "html", "lock"], }, exclude=EXCLUDED_FILES, ) @@ -142,7 +142,7 @@ def run() -> None: linter_config.external_linter( "prettier", ["node_modules/.bin/prettier", "--check", "--loglevel=warn"], - ["css", "js", "json", "ts", "yaml", "yml"], + ["css", "flow", "js", "json", "ts", "yaml", "yml"], fix_arg=["--write"], description="Formats CSS, JavaScript, YAML", )