updux/Taskfile.yaml

35 lines
887 B
YAML

# https://taskfile.dev
version: '3'
tasks:
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 "." }}
lint:eslint:delta:
vars:
FILES:
sh: git diff-ls --diff-filter=d main | grep -v .vitebook
cmds:
- npx eslint --format=unix {{.FILES | catLines }}
lint:eslint:
cmds:
- npx eslint {{.FILES | default "src/**" }}