summaryrefslogtreecommitdiff
path: root/tools/format.py
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2018-10-04 00:58:28 -0700
committerBert Belder <bertbelder@gmail.com>2018-10-04 02:02:23 -0700
commit8ca082c50898c62863e4baf04387bd37ce8328f8 (patch)
tree3dac0a9a7d21e44cfafcbbaa4a2d2eb0aca79e44 /tools/format.py
parent30acfdf331bd32597400fdba48a1217ec3256d41 (diff)
tools/format: format markdown files with prettier
Diffstat (limited to 'tools/format.py')
-rwxr-xr-xtools/format.py11
1 files changed, 8 insertions, 3 deletions
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"))