[eslint-plugin] 'Computed key cannot be resolved' when overwriting var
Open
bug
good first issue
- Dominant language
- JavaScript
- Stars
- 10.3k
- Forks
- 481
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 13
Description
**The problem**
```
Computed key cannot be resolved.eslint(@stylexjs/valid-styles)
```
**How to reproduce**
```tsx
// bug.stylex.ts
import * as stylex from '@stylexjs/stylex';
const vars = {
color: 'red',
};
export const componentVars = stylex.defineVars(vars);
```
```tsx
// bug.ts
import * as stylex from '@stylexjs/stylex';
import { componentVars } from './bug.stylex';
export const styles = stylex.create({
host: {
[componentVars.color]: 'blue',
// ^^^^^^^^^^^^^^^^^^^
},
});
```
Contributor guide
Assessment
This issue has not been assessed yet.