feat(linter): generate schemas for rules (with documentation)
Re-creation of #4151.
@Boshen I'm not sure what we want to do about configuration_schema.json, should we add a prepublish task to create it within oxlint?
Your org has enabled the Graphite merge queue for merging into main
Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.
You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.
CodSpeed Performance Report
Merging #4174 will not alter performance
Comparing don/linter/feat/rule-schemas (c1fc18c) with main (3d40528)
Summary
✅ 29 untouched benchmarks
I'm not sure what we want to do about configuration_schema.json, should we add a prepublish task to create it within oxlint?
I'll take a look at this today.
Do you think it's reasonable to only generate the minimum?
"comma-dangle": {
"$ref": "#/definitions/rule",
"description": "Require or disallow trailing commas"
},
https://github.com/SchemaStore/schemastore/blob/314c1867bd5db7d139804fa40b18d454132921af/src/schemas/json/eslintrc.json#L39-L42
Do you think it's reasonable to only generate the minimum?
"comma-dangle": { "$ref": "#/definitions/rule", "description": "Require or disallow trailing commas" },https://github.com/SchemaStore/schemastore/blob/314c1867bd5db7d139804fa40b18d454132921af/src/schemas/json/eslintrc.json#L39-L42
Unfortunately, I'm not sure how to get that... rules only have documentation, not a summary.
@Boshen what would you like to do with this PR?
I'll allocate some time later this week to go over all the bigger linter changes.
Shall we try and clean up the schema incrementally? It's difficult to review and merge this PR.