Fix prettier after moving node_modules to repo dir (#1413)

This commit is contained in:
Henrik Giesel 2021-10-09 02:13:14 +02:00 committed by GitHub
parent dec0fbe845
commit c63e0abd68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 6 additions and 10 deletions

2
.prettierignore Normal file
View file

@ -0,0 +1,2 @@
licenses.json
vendor

View file

@ -36,4 +36,5 @@ pkg_tar(
exports_files([ exports_files([
"defs.bzl", "defs.bzl",
"package.json", "package.json",
".prettierrc",
]) ])

View file

@ -1,5 +0,0 @@
licenses.json
vendor
lib/translate.ts
lib/i18n/modules.ts
backend_proto.d.ts

View file

@ -12,7 +12,6 @@ sql_format_setup()
################# #################
exports_files([ exports_files([
".prettierrc",
".eslintrc.js", ".eslintrc.js",
"licenses.json", "licenses.json",
"sql_format.ts", "sql_format.ts",

View file

@ -1,3 +1,2 @@
# this is a hack to invoke prettier directly from Bazel # this is a hack to invoke prettier directly from Bazel
ts=${BUILD_WORKSPACE_DIRECTORY}/ts (cd "${BUILD_WORKSPACE_DIRECTORY}" && node_modules/.bin/prettier --config .prettierrc --write ts qt/aqt/data/web/js)
(cd $ts && ./node_modules/.bin/prettier --config .prettierrc --write . $ts/../qt/aqt/data/web/js)

View file

@ -15,11 +15,11 @@ def prettier_test(name = "format_check", srcs = None, exclude = [], **kwargs):
name = name, name = name,
args = [ args = [
"--config", "--config",
"$(location //ts:.prettierrc)", "$(location //:.prettierrc)",
"--check", "--check",
] + [native.package_name() + "/" + f for f in srcs], ] + [native.package_name() + "/" + f for f in srcs],
data = [ data = [
"//ts:.prettierrc", "//:.prettierrc",
"@npm//prettier-plugin-svelte", "@npm//prettier-plugin-svelte",
] + srcs, ] + srcs,
**kwargs **kwargs