brandongregoryscott / eslint-plugin-collation

ESLint plugin for making your code easier to read, with autofix and TypeScript support
https://eslint-plugin-collation.brandonscott.me
Apache License 2.0
4 stars 0 forks source link

Handle self-closing JsxElements, as well as Jsx that is passed as props #8

Closed brandongregoryscott closed 2 years ago

brandongregoryscott commented 2 years ago

2 bugs I recently found during use on another project:

JsxSelfClosingElements are not handled at all, which means this won't be sorted:

<EmptyState
    title="No Instruments Found"
    description="Save a new instrument to begin"
    iconBgColor={theme.colors.gray100}
/>

Additionally, it would be nice to handle JsxElements that appear as children of JsxExpressions:

<Button marginY={8} marginRight={12} iconAfter={<CogIcon size={24} color="gray" />}>
    Settings
</Button>