stylex
stylex copied to clipboard
textDecorationThickness error reported using @stylexjs/eslint-plugin
The problem When using the following StyleX code;
textDecorationThickness: {
default: '1px',
':hover': 'max(3px, 0.1875rem, 0.12em)'
}
@stylexjs/eslint-plugin
reports This is not a key that is allowed by stylex @stylexjs/valid-styles
despite the styling being correct and working.
i have the same problem, also the queries variables dont work, had to manually set every property.
This is a known issue. Duplicate of #135.
Added textDecorationThickness
to list of missing properties. Will fix this tomorrow.
While #135 fixed the main issue it still throws this eslint error
error textDecorationThickness value must be one of:
a number ending in px, mm, in, pc, pt
a number ending in ch, em, ex, ic, rem, vh, vw, vmin, vmax, svh, dvh, lvh, svw, dvw, ldw, cqw, cqh, cqmin, cqmax
null
initial
inherit
unset
revert @stylexjs/valid-styles
for the hover line.
textDecorationThickness: {
default: '1px',
':hover': 'max(3px, 0.1875rem, 0.12em)'
}
@millnut This is a known issue and we will eventually overhaul the ESLint plugin with a proper parser. I have been working on one
Great I'll turn off the eslint rule for now