GlobFeatures
GlobFeatures =
object
Defined in: packages/format-glob/src/dialect.ts:8
Which constructs a glob dialect gives meaning to.
A construct switched off is matched literally, never rejected: that is how EditorConfig and gitignore behave with syntax they do not define, and a pattern file written for one tool must not become an error in another.
Properties
Section titled “Properties”backslashEscape
Section titled “backslashEscape”
readonlybackslashEscape:boolean
Defined in: packages/format-glob/src/dialect.ts:46
\x — the next character is literal.
braceAlternation
Section titled “braceAlternation”
readonlybraceAlternation:boolean
Defined in: packages/format-glob/src/dialect.ts:34
{a,b} — alternation between literal branches.
braceRange
Section titled “braceRange”
readonlybraceRange:boolean
Defined in: packages/format-glob/src/dialect.ts:37
{1..9} — an inclusive integer range.
caseSensitive
Section titled “caseSensitive”
readonlycaseSensitive:boolean
Defined in: packages/format-glob/src/dialect.ts:74
Whether matching is case sensitive.
characterClass
Section titled “characterClass”
readonlycharacterClass:boolean
Defined in: packages/format-glob/src/dialect.ts:22
[abc], [a-z] — a character class.
classNegation
Section titled “classNegation”
readonlyclassNegation:"!"|"^"|"both"
Defined in: packages/format-glob/src/dialect.ts:25
Which prefix negates a class. Ignored when characterClass is off.
comments
Section titled “comments”
readonlycomments:boolean
Defined in: packages/format-glob/src/dialect.ts:65
A leading # makes the whole pattern a comment, which matches nothing.
extglob
Section titled “extglob”
readonlyextglob:boolean
Defined in: packages/format-glob/src/dialect.ts:43
?(a|b), *(a|b), +(a|b), @(a|b), !(a|b) — the ksh extended glob
groups bash enables with shopt -s extglob.
globstar
Section titled “globstar”
readonlyglobstar:boolean
Defined in: packages/format-glob/src/dialect.ts:16
** — a whole path segment span, including separators.
leadingSlashAnchors
Section titled “leadingSlashAnchors”
readonlyleadingSlashAnchors:boolean
Defined in: packages/format-glob/src/dialect.ts:52
A leading / anchors the pattern to the search root rather than matching
at any depth.
matchBase
Section titled “matchBase”
readonlymatchBase:boolean
Defined in: packages/format-glob/src/dialect.ts:71
A pattern containing no separator is matched against the last path segment rather than against the whole path.
patternNegation
Section titled “patternNegation”
readonlypatternNegation:boolean
Defined in: packages/format-glob/src/dialect.ts:62
A leading ! inverts the whole pattern’s verdict. Repeated ! toggle, so
!!a means a. Unrelated to classNegation, which inverts one
character class and nothing else.
periodMustBeExplicit
Section titled “periodMustBeExplicit”
readonlyperiodMustBeExplicit:boolean
Defined in: packages/format-glob/src/dialect.ts:80
Whether a leading . must be matched by a literal . rather than by a
wildcard — POSIX’s hidden-file rule.
posixClasses
Section titled “posixClasses”
readonlyposixClasses:boolean
Defined in: packages/format-glob/src/dialect.ts:31
[[:alpha:]] — a POSIX class name inside a character class. Ignored when
characterClass is off.
singleChar
Section titled “singleChar”
readonlysingleChar:boolean
Defined in: packages/format-glob/src/dialect.ts:19
? — exactly one character.
starCrossesSeparator
Section titled “starCrossesSeparator”
readonlystarCrossesSeparator:boolean
Defined in: packages/format-glob/src/dialect.ts:13
* — any run of characters. Always on; starCrossesSeparator says
how far.
trailingSlashMeansDirectory
Section titled “trailingSlashMeansDirectory”
readonlytrailingSlashMeansDirectory:boolean
Defined in: packages/format-glob/src/dialect.ts:55
A trailing / restricts the match to directories.