Solid-specific linting rules for ESLint to enforce best practices and catch reactivity issues.
eslint-plugin-solid is an ESLint plugin that provides Solid.js-specific linting rules. It helps developers catch and fix common mistakes related to Solid's reactivity system, JSX usage, and component patterns, ensuring code follows Solid's best practices.
Solid.js developers and teams who want to maintain code quality, enforce consistent patterns, and avoid reactivity-related bugs in their applications.
It offers a curated set of rules tailored to Solid's unique paradigms, includes auto-fixable corrections for many issues, and provides configurations that ease setup for both JavaScript and TypeScript projects.
Solid-specific linting rules for ESLint.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The plugin enforces proper usage of Solid's reactivity primitives like signals and props, catching common mistakes such as destructuring props that break reactivity tracking, as detailed in the `solid/no-destructure` rule.
It includes rules like `solid/no-react-deps` and `solid/no-react-specific-props` that automatically fix React patterns, easing the transition for developers moving from React to Solid.
Many rules, such as `solid/style-prop` and `solid/imports`, offer automatic fixes via ESLint's CLI or editor integrations, reducing manual refactoring effort.
Rules like `solid/no-innerhtml` prevent security vulnerabilities, while `solid/prefer-for` encourages optimized Solid components for better rendering performance.
The plugin is still in version 0.x, meaning minor updates may introduce breaking changes, requiring users to pin versions with a tilde as cautioned in the README.
Setting up with ESLint's Flat Config or TypeScript involves multiple steps, such as importing separate configs and configuring parsers, which can be complex for newcomers.
As noted in troubleshooting, rules like `solid/reactivity` can incorrectly flag code in edge cases, forcing developers to manually disable rules and potentially miss actual issues.