fix: ignore node_modules by default

This commit is contained in:
Maas Lalani 2022-07-07 22:39:28 -04:00
parent 66e01ac849
commit d8ac24bcc6
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -26,12 +26,13 @@ func List() []string {
} }
var defaultIgnorePatterns = []string{"node_modules", ".git", "."}
func shouldIgnore(path string) bool { func shouldIgnore(path string) bool {
if strings.HasPrefix(path, ".git") { for _, prefix := range defaultIgnorePatterns {
return true if strings.HasPrefix(path, prefix) {
} return true
if strings.HasPrefix(path, ".") { }
return true
} }
return false return false
} }