Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linter): generate schemas for rules (with documentation) #4174

Closed
wants to merge 7 commits into from

Conversation

DonIsaac
Copy link
Contributor

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?

@DonIsaac DonIsaac added C-enhancement Category - New feature or request A-linter Area - Linter labels Jul 10, 2024
@DonIsaac DonIsaac requested a review from mysteryven July 10, 2024 21:09
Copy link

graphite-app bot commented Jul 10, 2024

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.

Copy link

codspeed-hq bot commented Jul 10, 2024

CodSpeed Performance Report

Merging #4174 will not alter performance

Comparing don/linter/feat/rule-schemas (c1fc18c) with main (3d40528)

Summary

✅ 29 untouched benchmarks

@Boshen Boshen self-assigned this Jul 11, 2024
@Boshen
Copy link
Member

Boshen commented Jul 11, 2024

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.

@Boshen Boshen force-pushed the don/linter/feat/rule-schemas branch from 473df2e to 334c859 Compare July 11, 2024 02:13
@Boshen
Copy link
Member

Boshen commented Jul 11, 2024

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

@Boshen Boshen force-pushed the don/linter/feat/rule-schemas branch from 334c859 to b74b53a Compare July 11, 2024 02:21
@Boshen Boshen assigned DonIsaac and unassigned Boshen Jul 11, 2024
@DonIsaac
Copy link
Contributor Author

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.

@DonIsaac
Copy link
Contributor Author

DonIsaac commented Aug 7, 2024

@Boshen what would you like to do with this PR?

@Boshen Boshen assigned Boshen and unassigned DonIsaac Aug 7, 2024
@Boshen
Copy link
Member

Boshen commented Aug 7, 2024

I'll allocate some time later this week to go over all the bigger linter changes.

@Boshen
Copy link
Member

Boshen commented Aug 12, 2024

Shall we try and clean up the schema incrementally? It's difficult to review and merge this PR.

@Boshen Boshen closed this Aug 12, 2024
@Boshen Boshen deleted the don/linter/feat/rule-schemas branch September 11, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants