2022-08-25 14:51:07 +00:00
|
|
|
# https://taskfile.dev
|
|
|
|
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
tasks:
|
2023-03-02 17:32:27 +00:00
|
|
|
test: vitest run src
|
|
|
|
test:dev: vitest src
|
|
|
|
|
2022-08-25 14:51:07 +00:00
|
|
|
lint:fix:delta:
|
|
|
|
vars:
|
|
|
|
FILES:
|
|
|
|
sh: git diff-ls --diff-filter=d main | grep -v .vitebook
|
|
|
|
deps:
|
|
|
|
- task: 'lint:fix'
|
|
|
|
vars:
|
|
|
|
CLI_ARGS: '{{.FILES | catLines }}'
|
|
|
|
|
|
|
|
lint:
|
|
|
|
cmds:
|
|
|
|
- npx prettier --check {{.CLI_ARGS | default "." }}
|
|
|
|
- npx eslint {{.CLI_ARGS | default "." }}
|
|
|
|
|
|
|
|
lint:fix:
|
|
|
|
cmds:
|
|
|
|
- npx prettier --write {{.CLI_ARGS | default "." }}
|
|
|
|
- npx eslint --fix --quiet {{.CLI_ARGS | default "." }}
|
|
|
|
|
2022-08-30 15:00:00 +00:00
|
|
|
lint:delta:
|
|
|
|
cmds:
|
2022-08-30 18:16:29 +00:00
|
|
|
- task: 'lint:prettier:delta'
|
|
|
|
- task: 'lint:eslint:delta'
|
2022-08-30 15:00:00 +00:00
|
|
|
|
|
|
|
lint:prettier:delta:
|
|
|
|
vars:
|
|
|
|
FILES:
|
|
|
|
sh: git diff-ls --diff-filter=d {{.ROOT_BRANCH | default "main"}} | grep -v .vitebook
|
|
|
|
cmds:
|
2022-08-30 18:16:29 +00:00
|
|
|
- npx prettier --check {{.FILES | catLines }}
|
2022-08-30 15:00:00 +00:00
|
|
|
|
2022-08-25 14:51:07 +00:00
|
|
|
lint:eslint:delta:
|
|
|
|
vars:
|
|
|
|
FILES:
|
2022-08-30 15:00:00 +00:00
|
|
|
sh: git diff-ls --diff-filter=d {{.ROOT_BRANCH | default "main"}} | grep -v .vitebook
|
2022-08-25 14:51:07 +00:00
|
|
|
cmds:
|
|
|
|
- npx eslint --format=unix {{.FILES | catLines }}
|
|
|
|
|
|
|
|
lint:eslint:
|
|
|
|
cmds:
|
|
|
|
- npx eslint {{.FILES | default "src/**" }}
|