mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
//ts:format now runs on current working directory, instead of entire repo
This commit is contained in:
parent
3b8b71b815
commit
a80a267cff
2 changed files with 16 additions and 13 deletions
|
@ -125,8 +125,21 @@ each file save automatically with:
|
||||||
|
|
||||||
## Fixing formatting
|
## Fixing formatting
|
||||||
|
|
||||||
If the format tests fail, most can be fixed by running `format`
|
For formatting issues with .ts, .svelte and .md files, change to the folder
|
||||||
in the relevant package:
|
that's causing the problem, and then run
|
||||||
|
|
||||||
|
```
|
||||||
|
bazel run //ts:format
|
||||||
|
```
|
||||||
|
|
||||||
|
For other packages, change to the folder and run
|
||||||
|
|
||||||
|
```
|
||||||
|
bazel run format
|
||||||
|
```
|
||||||
|
|
||||||
|
For the latter cases, you can also invoke the formatter from another folder by using
|
||||||
|
the full path:
|
||||||
|
|
||||||
```
|
```
|
||||||
bazel run //rslib:format
|
bazel run //rslib:format
|
||||||
|
@ -134,16 +147,9 @@ bazel run //rslib:sql_format
|
||||||
bazel run //proto:format
|
bazel run //proto:format
|
||||||
bazel run //pylib:format
|
bazel run //pylib:format
|
||||||
bazel run //qt:format
|
bazel run //qt:format
|
||||||
bazel run //ts:format
|
|
||||||
bazel run //pylib/rsbridge:format
|
bazel run //pylib/rsbridge:format
|
||||||
```
|
```
|
||||||
|
|
||||||
If you're in one of those folders, you can use the short form:
|
|
||||||
|
|
||||||
```
|
|
||||||
bazel run format
|
|
||||||
```
|
|
||||||
|
|
||||||
## Development speedups
|
## Development speedups
|
||||||
|
|
||||||
If you're frequently switching between Anki versions, you can create
|
If you're frequently switching between Anki versions, you can create
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
# this is a hack to invoke prettier directly from Bazel
|
# this is a hack to invoke prettier directly from Bazel
|
||||||
(cd "${BUILD_WORKSPACE_DIRECTORY}" && node_modules/.bin/prettier \
|
(cd "${BUILD_WORKSPACE_DIRECTORY}" && node_modules/.bin/prettier \
|
||||||
--config .prettierrc --write \
|
--config .prettierrc --write \
|
||||||
ts \
|
$BUILD_WORKING_DIRECTORY )
|
||||||
qt/aqt/data/web/js \
|
|
||||||
docs \
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in a new issue