diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-11-09 20:56:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 20:56:43 +0100 |
commit | 6f48c526c6ad1260020e099011c9496476c0fce3 (patch) | |
tree | 845b6e953a06cb3c0d7a1b02aef42352782c0968 | |
parent | b402b75c1de0497dd39a563cb7f5135d4ceb7fa7 (diff) |
chore: reference dprint config file in format script (#8318)
* chore: reference dprint config file in format script
* chore: ignore .git folder in dprint config
-rw-r--r-- | .dprintrc.json | 1 | ||||
-rwxr-xr-x | tools/format.js | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/.dprintrc.json b/.dprintrc.json index 726b2a4ad..4ec0ea675 100644 --- a/.dprintrc.json +++ b/.dprintrc.json @@ -13,6 +13,7 @@ "includes": ["**/*.{ts,tsx,js,jsx,json,md}"], "excludes": [ ".cargo_home", + ".git", "cli/dts/lib.d.ts", "cli/dts/lib.dom*", "cli/dts/lib.es*", diff --git a/tools/format.js b/tools/format.js index 9786e6fe3..1d891f361 100755 --- a/tools/format.js +++ b/tools/format.js @@ -3,10 +3,11 @@ import { getPrebuiltToolPath, getSources, join, ROOT_PATH } from "./util.js"; async function dprint() { + const configFile = join(ROOT_PATH, ".dprintrc.json"); const execPath = getPrebuiltToolPath("dprint"); console.log("dprint"); const p = Deno.run({ - cmd: [execPath, "fmt"], + cmd: [execPath, "fmt", "--config=" + configFile], }); const { success } = await p.status(); if (!success) { |