Skip to content

Commit

Permalink
refactor: prettify all files
Browse files Browse the repository at this point in the history
adapted out of GH typicode/husky/releases/tag/v9.1.0#:~:text=to%20the%20docs.-,Lint%20staged%20files
  • Loading branch information
mfranzke committed Jul 18, 2024
1 parent 1be6333 commit 53af477
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
validate-branch-name
node scripts/check-commit-mail.js
lint-staged --config ./.lintstagedrc.js
prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
git update-index --again
npm run lint:jscpd
3 changes: 1 addition & 2 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export default {
'*.md': 'markdownlint -c .markdown-lint.yml',
'*.{css,scss}': 'stylelint --fix --allow-empty-input',
'*.{js,ts,tsx,jsx,mjs,cjs}': ['prettier --write', 'xo --fix'],
'!*.{js,ts,tsx,jsx,mjs,cjs}': 'prettier --write --ignore-unknown'
'*.{js,ts,tsx,jsx,mjs,cjs}': ['xo --fix']
};

0 comments on commit 53af477

Please sign in to comment.