-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Properties not recognized by eslint-plugin #135
Comments
outlineOffset
is not recognized by eslint-plugin, but cannot be seted otherwiseoutlineOffset
is not recognized by eslint-plugin, but cannot be set otherwise
Same for export const styles = stylex.create({
container: {
transition: 'box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1)', // eslint(@stylexjs/valid-styles) error here
},
|
NOTE: A few properties are intentionally not allowed by the ESLint plugin even though they will work correctly in the Babel plugin:
This decision was made for a few reasons:
We are going to be discussing and reconsidering this decision. Any other missing property is an unknown bug so please report! Here's a running list so far:
|
Well noted, thanks. Maybe the eslint error message should be more explicit about it, encouraging using individual properties like transitionProperty, transitionDuration and transitionTimingFunction? |
I can work on this , looks interesting |
Seems fairly straightforward of an issue, can I contribute? Does it require assignee or just submit PR? |
There's a few other missing properties in the ESLint rule. You can find them and create a PR to add them. |
A Pr as per instructions of @nmn to add missing properties. |
|
I think |
@olivierpascal Yes, as mentioned above, we're discussing adding support for the few shorthands we manually disallowed. |
Css properties |
@olivierpascal I'll add them to the list of missing properties in the ESLint plugin that should be allowed. |
One of the other reasons not mentioned is that we want to have consistent merging rules for properties (like React Native), and that doesn't mix with allowing shorthands that can set values for several different properties (which also has an impact on the usefulness of their Types).
|
outlineOffset
is not recognized by eslint-plugin, but cannot be set otherwiseoutlineOffset
and other properties not recognized by eslint-plugin
Both scrollbarWidth and "::-webkit-scrollbar" scrollbarWidth: "none", |
scrollSnapStop |
outlineOffset
and other properties not recognized by eslint-plugin
@nmn I posted about this on Workplace too, but we should probably add |
@nmn This is perfect valid CSS. display: "-webkit-box",
WebkitBoxOrient: "vertical",
WebkitLineClamp: 2, |
Support for all the properties mentioned in this issue were added in v0.5.0 which was just released. |
@nmn lineHeight string is still not supported
|
If that's open for grabs, I'd file a PR. |
@nikeee go for it. |
The problem
The
outlineOffset
property is not recognized by the eslint-plugin.How to reproduce
With the following code:
I have the following eslint error from
@stylex/valid-styles
:stylex/packages/eslint-plugin/src/stylex-valid-styles.js
Lines 1948 to 1950 in f968076
But
outline
syntax does not allow an offset:Cf. https://developer.mozilla.org/en-US/docs/Web/CSS/outline
The text was updated successfully, but these errors were encountered: