facebook / facebook/stylex

[babel-plugin] Validate styles used in the Babel compiler

Open
#722 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
10.3k
Forks
481
Avg merge
3d 8h
Merged PRs (30d)
13

Description

Validate all styles that are created with `stylex.create` (and other APIs) in the Babel compiler itself, in addition to the `stylex/valid-styles` ESLint rule. Throw an error during the build when invalid values are used even if they *can* be compiled.

Add a configuration option to log the errors instead.

---

The validation logic should be backed by a full-featured CSS value parser. [`nmn/css-value-parser`](https://github.com/nmn/css-value-parser) may be used for this purpose.

Also see, #721

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.