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

chore: fix JSON schema for biome config file #3109

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

Conaclos
Copy link
Member

@Conaclos Conaclos commented Jun 7, 2024

Summary

Fix #3098

I really don't like the way we generate the schema for the rules. It is prone to errors. In the future, we should try a different approach: we could try to edit the schema directly in the code, instead of modifying the generated schema by traversing and patching it.

  • Update the schema on the website

Test Plan

Locally tested.

@github-actions github-actions bot added the A-Tooling Area: internal tools label Jun 7, 2024
@Conaclos Conaclos force-pushed the conaclos/fix-config-schema branch from 1e28dc3 to 6bcebb1 Compare June 7, 2024 11:08
Copy link
Contributor

github-actions bot commented Jun 7, 2024

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 50787 50787 0
Passed 49680 49680 0
Failed 1107 1107 0
Panics 0 0 0
Coverage 97.82% 97.82% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6534 6534 0
Passed 2087 2087 0
Failed 4447 4447 0
Panics 0 0 0
Coverage 31.94% 31.94% 0.00%

ts/babel

Test result main count This PR count Difference
Total 667 667 0
Passed 595 595 0
Failed 72 72 0
Panics 0 0 0
Coverage 89.21% 89.21% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18217 18217 0
Passed 13961 13961 0
Failed 4256 4256 0
Panics 0 0 0
Coverage 76.64% 76.64% 0.00%

@Conaclos Conaclos force-pushed the conaclos/fix-config-schema branch from 6bcebb1 to c69ce88 Compare June 7, 2024 11:15
@Conaclos Conaclos merged commit 9590d57 into main Jun 7, 2024
14 of 16 checks passed
@Conaclos Conaclos deleted the conaclos/fix-config-schema branch June 7, 2024 11:25
@ematipico
Copy link
Member

What's the issue? To be honest, I would benefit from some context or the problem, or nobody can help other than yourself 😔

@Conaclos
Copy link
Member Author

Conaclos commented Jun 7, 2024

What's the issue?

Each time we update the name of the data structures or add new structures, we have to update the script that patches the schema. Also, the script was copy-pasted on the website repository. Each time we update the script here, we have also to update the script in the website repository.
To avoid this we could try to create a manual impl of JsonSchema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Tooling Area: internal tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Impossible to satisfy biome.json schema for rules with no options
2 participants