facebook / facebook/stylex

[eslint-plugin] properties not recognized

Open
#135 24 comments 1 reaction 0 assignees View on GitHub
bug good first issue
Dominant language
JavaScript
Stars
10.3k
Forks
481
Avg merge
3d 8h
Merged PRs (30d)
13

Description

**The problem**

The `outlineOffset` property is not recognized by the eslint-plugin.

**How to reproduce**

With the following code:

```ts
import * as stylex from '@stylexjs/stylex';

export const styles = stylex.create({
container: {
outlineOffset: '2px', // eslint(@stylexjs/valid-styles) error here
},
});
```

I have the following eslint error from `@stylex/valid-styles`:

```
outlineOffset value must be one of:
'outlineOffset' is not supported yet. Please use 'outline' instead
```

https://github.com/facebook/stylex/blob/f968076548895dd1adc9736f1bfc371057beb94e/packages/eslint-plugin/src/stylex-valid-styles.js#L1948-L1950

But `outline` syntax does not allow an offset:

```
outline =
<'outline-color'> ||
<'outline-style'> ||
<'outline-width'>
```
Cf. https://developer.mozilla.org/en-US/docs/Web/CSS/outline

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.