A programming language that compiles into JavaScript, offering more concise and readable syntax while maintaining full JavaScript compatibility.
77
{
"context": "This criteria evaluates how well the engineer uses CoffeeScript's file compilation APIs to build a file compiler. The focus is on proper usage of internal file compilation methods, handling of different CoffeeScript formats, and error handling.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses _compileFile API",
"description": "Uses CoffeeScript._compileFile() method to compile files from the filesystem, rather than reimplementing file reading and compilation separately",
"max_score": 30
},
{
"name": "Reads file content",
"description": "Properly reads file content from filesystem (using fs.readFileSync or fs.promises.readFile) before compilation if not using _compileFile",
"max_score": 15
},
{
"name": "Uses compile API",
"description": "Uses CoffeeScript.compile() method with appropriate options when compiling from file content",
"max_score": 15
},
{
"name": "Literate mode detection",
"description": "Detects literate CoffeeScript files by extension (.litcoffee or .coffee.md) and sets the literate option accordingly, or relies on automatic detection in _compileFile",
"max_score": 15
},
{
"name": "Handles compilation options",
"description": "Properly passes through compilation options (bare, sourceMap, etc.) to CoffeeScript compilation methods",
"max_score": 10
},
{
"name": "Error propagation",
"description": "Allows CoffeeScript syntax errors to propagate with proper error messages that include filename context",
"max_score": 10
},
{
"name": "File existence check",
"description": "Handles file not found errors appropriately, either through try-catch or by checking file existence before compilation",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-coffeescriptevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10