-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Suggestion
π Search Terms
hidden, dot, dotfile, include, tsconfig.
β Viability Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
β Suggestion
Add an option in TSConfig to include hidden files (and hidden directories) in include
and exclude
options.
{
"hidden": true,
"include": ["**/*"],
}
Other alternative names for hidden
:
dot
like in:- node-glob: Include
.dot
files in normal matches andglobstar
matches. Note that an explicit dot in a portion of the pattern will always match dot files. - globby and fast-glob: Allow patterns to match entries that begin with a period (
.
). - tinyglobby: Whether to allow entries starting with a dot.
- node-glob: Include
dotfiles
like in express and serve-static (it usedhidden
before): Determines how dotfiles (files or directories that begin with a dot β.β) are treated.includeDot
andexcludeDot
by silverwind: #49555 (comment)
π Motivating Example
Proposal for wildcard documentation:
include
andexclude
support wildcard characters to make glob patterns:
*
matches zero or more characters (excluding directory separators and hidden file ifhidden
is set to false)?
matches any one character (excluding directory separators)**/
matches any directory nested to any level (excluding hidden directory ifhidden
is set to false)
π» Use Cases
I want to scan all files in my project, even hidden files and files in a hidden directory. I use this TSConfig (.foo/.bar/baz.ts
):
{
"include": [
"**/*",
"**/.*",
"**/.*/**/*",
"**/.*/**/.*"
]
}
π Related Issues
shian15810, CyberWalrus, millsp, dartess, SuperKXT and 24 moreernestostifano and matthewrose
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript