An object of CSS properties that don't accept values with units
92
Quality
Pending
Does it follow best practices?
Impact
92%
0.92xAverage score across 7 eval scenarios
{
"context": "This criteria evaluates how well the engineer uses the @emotion/unitless package to implement type-safe CSS property validation. The focus is on correct usage of the unitless lookup object, proper type guards with type narrowing, and effective property checking patterns.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import unitless object",
"description": "Correctly imports the default export from '@emotion/unitless' package (e.g., `import unitless from '@emotion/unitless'`)",
"max_score": 10
},
{
"name": "Type guard implementation",
"description": "Implements isUnitlessProperty as a proper TypeScript type guard using `property is keyof typeof unitless` return type and checks `property in unitless` and/or `unitless[property] === 1`",
"max_score": 25
},
{
"name": "Unitless lookup usage",
"description": "Uses the unitless object for property lookups by checking if `unitless[property] === 1` or `unitless[property] !== 1` to determine if properties are unitless",
"max_score": 20
},
{
"name": "Type narrowing application",
"description": "Applies the type guard to enable TypeScript type narrowing, using constructs like `property as keyof typeof unitless` or leveraging the type guard's return type for type-safe access",
"max_score": 15
},
{
"name": "Property checking patterns",
"description": "Uses `in` operator or direct property access patterns with the unitless object (e.g., `property in unitless`, `unitless[property]`, or `unitless.hasOwnProperty(property)`) to check property existence",
"max_score": 15
},
{
"name": "Conditional logic with unitless",
"description": "Implements conditional logic that branches based on whether `unitless[property] === 1` to differentiate between unitless and unit-requiring properties in formatStyleValue",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-emotion--unitless