A CSS Modules transform to extract local aliases for inline imports
87
{
"context": "This evaluation assesses how effectively the engineer uses the postcss-modules-extract-imports package to transform CSS Module composes declarations into import rules. The focus is on proper integration and usage of the package's core external file import handling capability.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Plugin Integration",
"description": "The solution correctly imports and uses postcss-modules-extract-imports as a PostCSS plugin. The plugin should be properly integrated into the PostCSS plugin structure with correct initialization.",
"max_score": 25
},
{
"name": "External Import Parsing",
"description": "The solution leverages postcss-modules-extract-imports to parse composes declarations with 'from' syntax (e.g., 'composes: className from \"./file.css\"'). The plugin should correctly extract the import path and class names from the composes declaration.",
"max_score": 25
},
{
"name": "Import Rule Generation",
"description": "The solution uses postcss-modules-extract-imports to generate :import() rules with unique identifiers. The generated identifiers should follow the pattern used by the package (e.g., i__imported_classname_N) and correctly map imported class names.",
"max_score": 25
},
{
"name": "Import Deduplication",
"description": "The solution properly utilizes postcss-modules-extract-imports's built-in deduplication mechanism to reuse the same generated identifier when the same class is imported multiple times from the same file.",
"max_score": 15
},
{
"name": "Multiple Class Handling",
"description": "The solution correctly uses postcss-modules-extract-imports to handle compositions that import multiple classes from a single file, generating separate unique identifiers for each class.",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-postcss-modules-extract-importsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10