configuration-oxlint/justfile
gcch bedd1fa23a 2026-04-03
- eslint OK
- import OK
- jsdoc OK
- node OK
- oxc OK
- promise OK
- typescript OK
- unicorn en cours
2026-04-06 10:18:12 +02:00

54 lines
1.3 KiB
Makefile

set shell := ["/usr/bin/fish", "-c"]
# Formate le code.
format:
bun prettier \
--cache --cache-location ".cache/prettiercache" \
--config "cfg/prettier.config.ts" \
--ignore-path "cfg/prettierignore" \
--ignore-unknown \
--parallel-workers 8 \
--write .
dprint fmt --config ~/.config/dprint/dprint.jsonc
# Met à jour les dépendances NPM.
update:
bun update --interactive
# Reporte les soucis du code TypeScript avec Oxlint.
lint-js:
bun --bun oxlint \
--config cfg/oxlint.config.ts
# Fixe le code TypeScript avec Oxlint.
fix-js:
bun --bun oxlint \
--config cfg/oxlint.config.ts \
--fix-dangerously
# Analyse le code mort et les dépendances inutilisées du projet.
find-dead-code:
-bun --bun knip \
--cache --cache-location ".cache/knipcache" \
--strict
-bun --bun knip \
--cache --cache-location ".cache/knipcache" \
--production \
--strict
# Compile le projet.
build:
bun tsdown \
--config "cfg/tsdown.config.ts" \
--attw --publint
# Nettoie le dossier de compilation.
clean:
rm -rf .cache/
rm -rf bun.lock
rm -rf node_modules/
rm -rfv dist/
# Teste les règles à la mise à jour des fichiers sources.
watch:
watchexec --watch "./rules/" just build lint-js