Convert globs to regular expressions
100
Pending
Does it follow best practices?
Impact
100%
1.14xAverage score across 9 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how well the engineer uses the glob-to-regexp package to implement pattern matching with character ranges. The focus is on proper usage of the extended mode option and understanding of how character class patterns are converted to regular expressions.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import glob-to-regexp",
"description": "Correctly imports or requires the glob-to-regexp package",
"max_score": 10
},
{
"name": "Extended mode enabled",
"description": "Calls globToRegExp with {extended: true} option to enable character class support, which is required for [] patterns to work",
"max_score": 25
},
{
"name": "Pattern conversion",
"description": "Uses globToRegExp function to convert the glob pattern string into a RegExp object",
"max_score": 20
},
{
"name": "Regex testing",
"description": "Uses the RegExp.test() method or equivalent regex matching to check if the filename matches the pattern",
"max_score": 20
},
{
"name": "Correct return values",
"description": "Returns boolean values (true/false) based on whether the filename matches the pattern",
"max_score": 15
},
{
"name": "Handle all test cases",
"description": "Implementation correctly handles digit ranges [0-9], letter ranges [a-z] and [A-Z], combined patterns with wildcards, and multiple character classes",
"max_score": 10
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9