Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correctly handle incorrect patterns with braces of only single v…
…alue Technically brace patterns like `*.{js}` are invalid because braces should always contain at least one comma or a sequence, for example `*.{js,ts}` or `file{1..10}.js`. The `micromatch` library used to match patterns to files will silently ignore such invalid braces and thus lead to the pattern always matching zero files. This is a unintuitive, so lint-staged should normalize such cases by simply removing the unnecessary braces before matching files.
- Loading branch information
Showing
4 changed files
with
128 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters