Remove --no-stash flag from lint-staged in pre-commit hook (#6188)

### Problem

The `--no-stash` flag was originally added to work around issues where teammates hadn't installed Biome after our migration from Prettier. When the formatter failed, lint-staged's default stashing behavior would remove staged changes, causing frustration.

However, this workaround now causes a different problem: lint-staged runs formatters on files containing both staged AND unstaged changes. When Biome formats these files, it inadvertently stages unstaged modifications, effectively merging work-in-progress changes into commits.

### Solution

Remove the `--no-stash` flag to restore lint-staged's default behavior:

- Stash unstaged changes before running formatters
- Run formatters only on staged content
- Restore the stash after formatting

This ensures that only intentionally staged changes are included in commits, preventing accidental inclusion of work-in-progress modifications.

### Context

It's been sufficient time since the Prettier → Biome migration that all team members should have the proper tooling installed. The original workaround is no longer needed and is now causing more problems than it solves.
This commit is contained in:
Bee authored and GitHub committed 2025-09-13 04:21:18 -07:00
1 parent eece559f51
commit 60ddf80e5c
1 file changed
+1 -1
+1 -1
View File
@@ -1 +1 @@
lint-staged --no-stash
lint-staged