biome
biome copied to clipboard
feat(biome_js_analyzer): useJsxSortProps
Summary
Implement Eslint's lint rule [jsx-sort-props](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md]
Test Plan
All tests should pass
CodSpeed Performance Report
Merging #2652 will not alter performance
Comparing vohoanglong0107:feat-use-jsx-sort-props
(49ad1ed) with main
(88f1d5e)
Summary
✅ 101
untouched benchmarks
I'm not very fond of having stylistic rules inside our linter. I think this rule should be an assist.
I was working on a similar rule for sorting JSON keys, and setting up the foundations for assists inside the CLI and LSP.
Oh ok, then I will set this PR to draft for the time being
Hey @vohoanglong0107, the infrastructure is ready. You should move the new rule inside src/assists/source
, and use the macro declare_source_rule
This rule will be helpful if it will be passed.
@ematipico How may I generate the configuration and the schema for an assist rule? just new-js-assistrule
doesn't seem to work, the same goes for just gen-all
😥
@ematipico How do you feel about the new docs?
They're good, thank you!