CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-shebang-regex

Regular expression for matching Unix shebang lines at the beginning of files

88

1.54x
Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates the engineer's ability to use the shebang-regex package to detect shebang lines in script content. The focus is on proper import/require of the package and correct usage of the regex test() method for shebang presence detection.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Package import",
      "description": "Correctly imports or requires the shebang-regex package (e.g., `const shebangRegex = require('shebang-regex')` or `import shebangRegex from 'shebang-regex'`)",
      "max_score": 15
    },
    {
      "name": "test() method usage",
      "description": "Uses the shebangRegex.test() method to check for shebang presence in the hasShebang function",
      "max_score": 30
    },
    {
      "name": "Correct return type",
      "description": "Returns a boolean value from hasShebang function based on shebang-regex test result",
      "max_score": 15
    },
    {
      "name": "Array filtering implementation",
      "description": "Uses shebangRegex.test() within the filterScriptsWithShebang function to filter the array of files",
      "max_score": 25
    },
    {
      "name": "Proper content access",
      "description": "Correctly accesses the 'content' property from file objects when testing for shebangs in filterScriptsWithShebang",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-shebang-regex

tile.json