From 8ca082c50898c62863e4baf04387bd37ce8328f8 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 4 Oct 2018 00:58:28 -0700 Subject: tools/format: format markdown files with prettier --- tools/format.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/format.py b/tools/format.py index b91e75635..272f2c82b 100755 --- a/tools/format.py +++ b/tools/format.py @@ -28,9 +28,14 @@ for fn in ["BUILD.gn", ".gn"] + find_exts("build_extra", ".gn", ".gni"): # TODO(ry) Install yapf in third_party. run(["yapf", "-i"] + glob("tools/*.py") + find_exts("build_extra", ".py")) -run(["node", prettier, "--write"] + find_exts("js/", ".js", ".ts") + - find_exts("tests/", ".js", ".ts") + find_exts("website/", ".js", ".ts") + - ["rollup.config.js", "tsconfig.json", "tslint.json"]) +# yapf: disable +run(["node", prettier, "--write"] + + ["rollup.config.js"] + glob("*.json") + glob("*.md") + + find_exts(".github/", ".md") + + find_exts("js/", ".js", ".ts", ".md") + + find_exts("tests/", ".js", ".ts", ".md") + + find_exts("website/", ".js", ".ts", ".md")) +# yapf: enable # Requires rustfmt 0.8.2 (flags were different in previous versions) run(["rustfmt", "--config-path", rustfmt_config] + find_exts("src/", ".rs")) -- cgit v1.2.3