stylex icon indicating copy to clipboard operation
stylex copied to clipboard

textDecorationThickness error reported using @stylexjs/eslint-plugin

Open millnut opened this issue 1 year ago • 5 comments

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.

millnut avatar Dec 24 '23 14:12 millnut

i have the same problem, also the queries variables dont work, had to manually set every property.

alejandroyunes avatar Dec 25 '23 06:12 alejandroyunes

This is a known issue. Duplicate of #135.

Added textDecorationThickness to list of missing properties. Will fix this tomorrow.

nmn avatar Dec 25 '23 12:12 nmn

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 avatar Dec 29 '23 14:12 millnut

@millnut This is a known issue and we will eventually overhaul the ESLint plugin with a proper parser. I have been working on one

nmn avatar Dec 30 '23 00:12 nmn

Great I'll turn off the eslint rule for now

millnut avatar Dec 30 '23 10:12 millnut