biome icon indicating copy to clipboard operation
biome copied to clipboard

feat(biome_js_analyzer): useJsxSortProps

Open vohoanglong0107 opened this issue 9 months ago • 4 comments

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

vohoanglong0107 avatar Apr 30 '24 01:04 vohoanglong0107

CodSpeed Performance Report

Merging #2652 will not alter performance

Comparing vohoanglong0107:feat-use-jsx-sort-props (49ad1ed) with main (88f1d5e)

Summary

✅ 101 untouched benchmarks

codspeed-hq[bot] avatar Apr 30 '24 02:04 codspeed-hq[bot]

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.

ematipico avatar May 01 '24 07:05 ematipico

Oh ok, then I will set this PR to draft for the time being

vohoanglong0107 avatar May 01 '24 08:05 vohoanglong0107

Hey @vohoanglong0107, the infrastructure is ready. You should move the new rule inside src/assists/source, and use the macro declare_source_rule

ematipico avatar Aug 05 '24 14:08 ematipico

This rule will be helpful if it will be passed.

PrinOrange avatar Aug 14 '24 03:08 PrinOrange

@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 😥

vohoanglong0107 avatar Aug 15 '24 13:08 vohoanglong0107

@ematipico How do you feel about the new docs?

vohoanglong0107 avatar Aug 28 '24 00:08 vohoanglong0107

They're good, thank you!

ematipico avatar Aug 28 '24 07:08 ematipico