diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..3fd69af96 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +licenses.json +vendor diff --git a/ts/.prettierrc b/.prettierrc similarity index 100% rename from ts/.prettierrc rename to .prettierrc diff --git a/BUILD.bazel b/BUILD.bazel index 2e1218f56..79ba87f85 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -36,4 +36,5 @@ pkg_tar( exports_files([ "defs.bzl", "package.json", + ".prettierrc", ]) diff --git a/ts/.prettierignore b/ts/.prettierignore deleted file mode 100644 index 339fa65b6..000000000 --- a/ts/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -licenses.json -vendor -lib/translate.ts -lib/i18n/modules.ts -backend_proto.d.ts diff --git a/ts/BUILD.bazel b/ts/BUILD.bazel index 283d64bbe..bc337e8bb 100644 --- a/ts/BUILD.bazel +++ b/ts/BUILD.bazel @@ -12,7 +12,6 @@ sql_format_setup() ################# exports_files([ - ".prettierrc", ".eslintrc.js", "licenses.json", "sql_format.ts", diff --git a/ts/format.sh b/ts/format.sh index 11131be39..1f66bd492 100755 --- a/ts/format.sh +++ b/ts/format.sh @@ -1,3 +1,2 @@ # this is a hack to invoke prettier directly from Bazel -ts=${BUILD_WORKSPACE_DIRECTORY}/ts -(cd $ts && ./node_modules/.bin/prettier --config .prettierrc --write . $ts/../qt/aqt/data/web/js) +(cd "${BUILD_WORKSPACE_DIRECTORY}" && node_modules/.bin/prettier --config .prettierrc --write ts qt/aqt/data/web/js) diff --git a/ts/prettier.bzl b/ts/prettier.bzl index caba22c31..f2512d634 100644 --- a/ts/prettier.bzl +++ b/ts/prettier.bzl @@ -15,11 +15,11 @@ def prettier_test(name = "format_check", srcs = None, exclude = [], **kwargs): name = name, args = [ "--config", - "$(location //ts:.prettierrc)", + "$(location //:.prettierrc)", "--check", ] + [native.package_name() + "/" + f for f in srcs], data = [ - "//ts:.prettierrc", + "//:.prettierrc", "@npm//prettier-plugin-svelte", ] + srcs, **kwargs