i love lint-staged

This commit is contained in:
maxichrome 2023-01-19 19:15:33 -08:00
parent cfbd0d16aa
commit 289fc109fd
2 changed files with 5 additions and 12 deletions

3
.lintstagedrc.json Normal file
View file

@ -0,0 +1,3 @@
{
"*.{js,jsx,ts,tsx,html,json,yml,yaml,css,scss,md}": ["prettier --write"]
}

View file

@ -6,15 +6,5 @@
pre-commit:
commands:
# automatically format files, ✨magically✨
prettier:
glob: '[^pnpm-lock]*.{js,jsx,ts,tsx,html,json,yml,yaml,css,scss,md}'
run: pnpm prettier --write {staged_files} && git add {staged_files}
# pre-push:
# parallel: true
# commands:
# lint:
# glob: '*.{ts,tsx}'
# run: pnpm eslint {staged_files}
# markdown-link-check:
# glob: '*.md'
# run: pnpm markdown-link-check {staged_files}
lint-staged:
run: pnpm lint-staged