CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-lilconfig

A zero-dependency alternative to cosmiconfig for loading configuration files

89

1.21x
Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how effectively the engineer uses lilconfig's configuration file search capabilities, specifically focusing on directory tree traversal functionality. The assessment measures correct usage of lilconfig's API for searching upward through directories, configuring search parameters, and handling search results.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses lilconfig function",
      "description": "The solution imports and uses the lilconfig() function to create a configuration explorer instance",
      "max_score": 15
    },
    {
      "name": "Calls search method",
      "description": "The solution uses the explorer's search() method to find configuration files by traversing up the directory tree",
      "max_score": 20
    },
    {
      "name": "Configures module name",
      "description": "The solution passes an appropriate module name (e.g., 'app') as the first argument to lilconfig() to define which configuration files to search for",
      "max_score": 10
    },
    {
      "name": "Configures searchPlaces",
      "description": "The solution uses the searchPlaces option to specify the ordered list of configuration file locations to search (e.g., package.json, .apprc.json, .config/apprc.json, app.config.js)",
      "max_score": 15
    },
    {
      "name": "Uses stopDir option",
      "description": "The solution uses the stopDir option to control the upper boundary of directory traversal, preventing search from going beyond a specified directory",
      "max_score": 15
    },
    {
      "name": "Passes searchFrom parameter",
      "description": "The solution passes a starting directory path as an argument to the search() method to control where the upward traversal begins",
      "max_score": 15
    },
    {
      "name": "Handles search result",
      "description": "The solution correctly handles the LilconfigResult object returned by search(), extracting config and filepath properties when a configuration is found, and handling null when no configuration is found",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-lilconfig

tile.json