CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-clean-css

A well-tested CSS minifier providing fast and efficient CSS optimization and minification.

93

1.17x

Quality

Pending

Does it follow best practices?

Impact

93%

1.17x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

rubric.jsonevals/scenario-8/

{
  "context": "This evaluation assesses how well the engineer uses the clean-css package to implement CSS selector optimization, specifically focusing on the nth-child/nth-of-type shortcut replacement functionality. The criteria evaluate proper package instantiation, configuration, and correct usage of the minification API.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "CleanCSS import/require",
      "description": "Correctly imports or requires the CleanCSS constructor from the clean-css package (e.g., `const CleanCSS = require('clean-css')` or `import CleanCSS from 'clean-css'`)",
      "max_score": 15
    },
    {
      "name": "CleanCSS instantiation",
      "description": "Creates a new instance of CleanCSS using the constructor (e.g., `new CleanCSS()` or `new CleanCSS(options)`)",
      "max_score": 15
    },
    {
      "name": "Level 1 configuration",
      "description": "Configures CleanCSS with level 1 optimizations enabled, which is required for selector optimizations including nth-child/nth-of-type shortcut replacements. This can be done explicitly via options object with level 1 settings, or implicitly by relying on defaults.",
      "max_score": 20
    },
    {
      "name": "minify() method usage",
      "description": "Calls the minify() method on the CleanCSS instance with the input CSS string as the argument",
      "max_score": 15
    },
    {
      "name": "Extract minified output",
      "description": "Correctly extracts the optimized CSS from the minify() result by accessing the 'styles' property of the returned object (e.g., `result.styles` or destructuring `{styles}`)",
      "max_score": 20
    },
    {
      "name": "Return optimized CSS",
      "description": "Returns the extracted minified/optimized CSS string from the optimize function",
      "max_score": 15
    }
  ]
}

tile.json