Skip to content

Commit

Permalink
Use single or double star to ignore workspaces, remove single star fo…
Browse files Browse the repository at this point in the history
…r ignore glob pattern
  • Loading branch information
webpro committed Jul 20, 2024
1 parent bd16c98 commit f6b0058
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/knip/src/ConfigurationChief.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,11 @@ export class ConfigurationChief {
}

private getIgnoredWorkspacePatterns() {
const ignoredWorkspaces = this.getListedWorkspaces()
const ignoredWorkspacesManifest = this.getListedWorkspaces()
.filter(name => name.startsWith('!'))
.map(name => name.replace(/^!/, ''));
return [...ignoredWorkspaces, ...this.config.ignoreWorkspaces];
const ignoredWorkspacesConfig = this.config.ignoreWorkspaces.map(name => name.replace(/\/\*$/, ''));
return [...ignoredWorkspacesManifest, ...ignoredWorkspacesConfig];
}

private getConfiguredWorkspaceKeys() {
Expand Down

0 comments on commit f6b0058

Please sign in to comment.