From b72959a91fddd85a8f2205362add94152d7437c0 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Wed, 7 Dec 2022 23:22:20 -0800 Subject: [PATCH] fmt --- .prettierignore | 6 ++++++ Makefile | 2 +- ci/fmt.sh | 6 ------ d2compiler/compile_test.go | 2 +- d2layouts/d2elklayout/layout.go | 1 + d2layouts/d2sequence/layout.go | 1 - d2plugin/serve.go | 2 +- d2renderers/d2latex/latex.go | 1 + lib/imgbundler/imgbundler.go | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 .prettierignore delete mode 100755 ci/fmt.sh diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..d7226ae8f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +d2layouts/d2dagrelayout/dagre.js +d2layouts/d2elklayout/setup.js +d2renderers/d2latex/mathjax.js +d2renderers/d2latex/polyfills.js +d2renderers/d2latex/setup.js +lib/png/generate_png.js diff --git a/Makefile b/Makefile index fdc039a33..13a440c2c 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ all: fmt gen lint build test .PHONY: fmt fmt: - prefix "$@" ./ci/fmt.sh + prefix "$@" GOIMPORTS_LOCAL=oss.terrastruct.com, ./ci/sub/bin/fmt.sh .PHONY: gen gen: prefix "$@" ./ci/gen.sh diff --git a/ci/fmt.sh b/ci/fmt.sh deleted file mode 100755 index 90b405eab..000000000 --- a/ci/fmt.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -eu -. "$(dirname "$0")/sub/lib.sh" -cd -- "$(dirname "$0")/.." - -./ci/sub/bin/fmt.sh diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index 593c139d9..b68e28644 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -7,9 +7,9 @@ import ( "testing" tassert "github.com/stretchr/testify/assert" + "oss.terrastruct.com/util-go/assert" "oss.terrastruct.com/util-go/diff" - "oss.terrastruct.com/d2/d2compiler" "oss.terrastruct.com/d2/d2format" "oss.terrastruct.com/d2/d2graph" diff --git a/d2layouts/d2elklayout/layout.go b/d2layouts/d2elklayout/layout.go index 2449a9751..63b26c95f 100644 --- a/d2layouts/d2elklayout/layout.go +++ b/d2layouts/d2elklayout/layout.go @@ -12,6 +12,7 @@ import ( "math" "github.com/dop251/goja" + "oss.terrastruct.com/util-go/xdefer" "oss.terrastruct.com/util-go/go2" diff --git a/d2layouts/d2sequence/layout.go b/d2layouts/d2sequence/layout.go index 7940e13b1..c6934c051 100644 --- a/d2layouts/d2sequence/layout.go +++ b/d2layouts/d2sequence/layout.go @@ -6,7 +6,6 @@ import ( "strings" "oss.terrastruct.com/util-go/go2" - "oss.terrastruct.com/d2/d2graph" "oss.terrastruct.com/d2/d2target" "oss.terrastruct.com/d2/lib/geo" diff --git a/d2plugin/serve.go b/d2plugin/serve.go index 4f83aa8a8..b99768e3a 100644 --- a/d2plugin/serve.go +++ b/d2plugin/serve.go @@ -8,8 +8,8 @@ import ( "io" "github.com/spf13/pflag" - "oss.terrastruct.com/util-go/xmain" + "oss.terrastruct.com/util-go/xmain" "oss.terrastruct.com/d2/d2graph" ) diff --git a/d2renderers/d2latex/latex.go b/d2renderers/d2latex/latex.go index 74fdb0759..a822b2c7b 100644 --- a/d2renderers/d2latex/latex.go +++ b/d2renderers/d2latex/latex.go @@ -8,6 +8,7 @@ import ( "strconv" "github.com/dop251/goja" + "oss.terrastruct.com/util-go/xdefer" ) diff --git a/lib/imgbundler/imgbundler.go b/lib/imgbundler/imgbundler.go index 14ff92cd8..e1b719687 100644 --- a/lib/imgbundler/imgbundler.go +++ b/lib/imgbundler/imgbundler.go @@ -17,8 +17,8 @@ import ( "time" "golang.org/x/xerrors" - "oss.terrastruct.com/util-go/xdefer" + "oss.terrastruct.com/util-go/xdefer" "oss.terrastruct.com/util-go/xmain" )