facebook / facebook/stylex

[eslint-plugin] valid-styles error when using `stylex.firstThatWorks`

Open
#699 2 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
10.3k
Forks
481
Avg merge
3d 8h
Merged PRs (30d)
13

Description

### Describe the issue

when using `stylex.firstThatWorks` on a property, I'm seeing ESLint errors for `@stylexjs/valid-styles`

e.g.

```ts
const styles = stylex.create({
example: {
position: stylex.firstThatWorks("sticky", "fixed") // errors, but shouldn't
}
})
```

### Expected behavior

using the above code should work with ESLint Rule

### Steps to reproduce

1. use the example
2. see ESLint showing error, even though the styles are valid.

### Test case

_No response_

### Additional comments

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.