-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
☂️ SolidJS eslint plugin rules #2438
Comments
I'll take a jab at Does Biome already have a list of all known css rules? |
Unfortunately, it doesn't. |
Should I paste a list somewhere or make it try to convert any camel to kebab (except all uppercase)? |
@jer3m01 I already started working on style-prop, maybe you can take some stuff from my ugly WIP (I'd definitely change the Query to be |
Good luck 🫡 feel free to drop an issue to the ESLint plugin if you have any questions |
Description
no-react-specific-props
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-react-specific-props.md
Disallow React prop compatibility which was deprecated in Solid 1.4.0.
Implemented in #2427
components-return-once
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/components-return-once.md
Solid components only run once, and so conditionals should be inside JSX.
WIP #2439
prefer-show
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/prefer-show.md
Enforce using Solid's component for conditionally showing content. Solid's compiler covers this case, so it's a stylistic rule only.
prefer-for
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/prefer-for.md
Enforce using Solid's component for mapping an array to JSX elements. This rule is an error by default.
no-destructure
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-destructure.md
Disallow destructuring props. In Solid, props must be used with property accesses (props.foo) to preserve reactivity.
no-react-deps
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-react-deps.md
Disallow usage of dependency arrays in createEffect and createMemo.
style-prop
https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/style-prop.md
Require CSS properties in the style prop to be valid and kebab-cased (ex. 'font-size'), not camel-cased (ex. 'fontSize') like in React, and that property values with dimensions are strings, not numbers with implicit 'px' units.
The text was updated successfully, but these errors were encountered: