solidjs-community / eslint-plugin-solid

Solid-specific linting rules for ESLint.
MIT License
209 stars 24 forks source link

Detect prefer-show in arrow functions nested in JSXExpressionContainer #70

Closed aadito123 closed 1 year ago

aadito123 commented 1 year ago

If a conditional was inside a arrow function that was inside of a JSXExpressionContainer, then the linter would not detect it. Example below used to go undetected (also used in test cases): <For each={someList()}> {(item) => (item.condition ? <h1 /> : <h2 />)} </For>

Detected and fixed now.

joshwilsonvu commented 1 year ago

Thanks so much for putting this together! Looks good to me--I'll play around with it a little more when I get the chance.

joshwilsonvu commented 1 year ago

Shipped in v0.10.0!