When defining exclusion patterns, file filters, or other configuration rules, use specific, targeted patterns rather than broad glob patterns. Overly broad patterns can lead to unintended exclusions and hard-to-debug issues in the future when legitimate files need to be included.
When defining exclusion patterns, file filters, or other configuration rules, use specific, targeted patterns rather than broad glob patterns. Overly broad patterns can lead to unintended exclusions and hard-to-debug issues in the future when legitimate files need to be included.
For example, instead of using a broad pattern like !dist/**/*.tgz
that excludes all .tgz files from any subdirectory, use a specific pattern like !dist/google-gemini-cli-core-*.tgz
that targets only the intended files. This approach:
{
"files": [
"dist",
"!dist/google-gemini-cli-core-*.tgz" // Specific pattern
]
}
This principle applies to all configuration contexts including package.json files arrays, .gitignore patterns, build tool configurations, and other rule-based settings.
Enter the URL of a public GitHub repository