Skip to content

Commit

Permalink
fix: missing path for bulk format command
Browse files Browse the repository at this point in the history
  • Loading branch information
niebag committed Apr 15, 2024
1 parent 6c2e681 commit 3ca3074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function lint(filenames) {
/** @type {import("lint-staged").ConfigFn} */
function prettier(filenames) {
// If there are more than 10 staged files, run prettier over the whole project
if (filenames.length > 10) return 'prettier --write';
if (filenames.length > 10) return 'prettier --write .';

// Otherwise, run prettier over each file individually
return `prettier --write ${filenames.map((f) => path.relative(process.cwd(), f)).join(' ')}`;
Expand Down

0 comments on commit 3ca3074

Please sign in to comment.