Closed wkeese closed 4 months ago
In version 2 this is as expected, set option acceptCarbonFontWeightFunction
to true to allow font weight functions.
const defaultOptions = {
// include standard type properties
includeProps: ["font", "/^font-*/", "line-height", "letterSpacing"],
acceptValues: ["/inherit|initial/"],
acceptsScopes: ["type"],
acceptCarbonFontWeightFunction: false, // permit use of carbon font weight function
acceptCarbonTypeScaleFunction: false, // permit use of carbon type scale function
acceptCarbonFontFamilyFunction: false, // permit use of carbon font family function
carbonPath: undefined // allows a different path for node_modules (supports monorepo with multiple carbon versions),
e.g. packages/proj1/node_modules/@carbon
carbonModulePostfix: undefined, // optional for use in conjunction with `carbonPath` to where a Carbon module has been renamed e.g. `-10` with a carbonPath of `node_modules/@carbon` will use `node_modules/@carbon/type-10`
enforceScopes: false
};
Given the SCSS of
I'm getting the error that:
Presumably, that shouldn't be flagged, because
type.font-weight()
is a carbon mixin.