Skip to content

Commit b794af1

Browse files
feat(rulegen): add config struct (#13320)
Parses the meta.schema field of the eslint rule to code generate the structs and enums needed for the rule. It also adds the derive attributes so that documentation code generation can read the struct shape and `from_configuration` can easily deserialize. Improvements that I would prefer to tackle for follow up PRs: - Resolve the schema value in javascript (a la `tasks/lint_rules` package), then parse in rust - Parse other parts of the json schema for validation, like `minItems` and `maximum`, and use a validation crate in `from_configuration` - Support json schema constants like `true`, number literals like `1` and `null` - Support other json schema concepts like `allOf`, `not`, `patternProperties`, `additionalProperties`, and others - Support migrating existing rules to this new format - Use configs in `oxlintrc.json` schema generation for lsps to validate in the editor --------- Co-authored-by: Cameron Clark <cameron.clark@hey.com>
1 parent b2bc5b4 commit b794af1

File tree

3 files changed

+851
-15
lines changed

3 files changed

+851
-15
lines changed

0 commit comments

Comments
 (0)