CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-glob-to-regexp

Convert globs to regular expressions

Overall
score

100%

Overview
Eval results
Files

rubric.jsonevals/scenario-5/

{
  "context": "This criteria evaluates how well the engineer uses the glob-to-regexp package to implement file pattern matching, specifically focusing on the proper use of globstar (**) for multi-level directory traversal and extended mode ({}) for pattern alternatives.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports glob-to-regexp",
      "description": "Code imports or requires the glob-to-regexp package (e.g., const globToRegExp = require('glob-to-regexp') or similar)",
      "max_score": 10
    },
    {
      "name": "Calls globToRegExp function",
      "description": "Code calls the globToRegExp function with pattern strings to convert them to regular expressions",
      "max_score": 15
    },
    {
      "name": "Enables globstar option",
      "description": "Code passes {globstar: true} as the options parameter to globToRegExp for patterns containing ** to enable multi-level directory matching",
      "max_score": 25
    },
    {
      "name": "Enables extended option",
      "description": "Code passes {extended: true} as the options parameter to globToRegExp for patterns containing {} to enable brace expansion for alternatives",
      "max_score": 25
    },
    {
      "name": "Combines both options",
      "description": "Code correctly uses both {extended: true, globstar: true} together in the same options object when patterns contain both ** and {} features",
      "max_score": 15
    },
    {
      "name": "Tests against file paths",
      "description": "Code uses the generated RegExp objects to test file paths (e.g., using .test() method or similar matching approach)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-glob-to-regexp

tile.json