eslint-plugin-wix-style-react
raw JSON → 1.0.418 verified Fri May 01 auth: no javascript
An ESLint plugin providing custom lint rules for projects using the Wix Style React library. Current version is 1.0.418. It enforces best practices and prevents common mistakes specific to wix-style-react components, such as avoiding full library imports. The package is maintained by Wix and follows ESLint plugin conventions. It is designed for Node.js environments (>=0.10.0) and requires ESLint as a peer dependency. Key differentiator: it focuses on Wix's internal React component library, offering rules not found in general React lint plugins.
Common errors
error Error: Failed to load plugin 'wix-style-react': Cannot find module 'eslint-plugin-wix-style-react' ↓
cause Plugin not installed or not in node_modules.
fix
Run 'npm install eslint-plugin-wix-style-react --save-dev' and ensure it is in the project's dependencies.
error Error: Configuration for rule 'wix-style-react/no-full-wsr-lib' is invalid: value '2' is not a valid severity. ↓
cause Using numeric severity (2) without proper ESLint version support or inside flat config.
fix
Use string severity 'error' instead of number: 'wix-style-react/no-full-wsr-lib': 'error'
Warnings
gotcha Plugin may not work with ESLint flat config (eslint.config.js) as it follows legacy config format. ↓
fix Use .eslintrc or .eslintrc.json for configuration, or check for plugin updates supporting flat config.
breaking Node engine requirement >=0.10.0 is outdated; modern Node versions may cause unexpected behavior. ↓
fix Use Node >= 12 or check for newer plugin versions with updated engine requirements.
deprecated The package repository is private (github.com/wix-private/wix-ui). External contributors may not access issues or PRs. ↓
fix Submit issues through Wix support or internal channels.
gotcha Rule names and behavior may change without public changelog due to private development. ↓
fix Pin plugin version and test after updates.
Install
npm install eslint-plugin-wix-style-react yarn add eslint-plugin-wix-style-react pnpm add eslint-plugin-wix-style-react Imports
- Plugin Config wrong
// Missing or incorrect plugin namecorrect// In .eslintrc: { "plugins": ["wix-style-react"] } - Rules wrong
// Using 'wix-style-react/no-full-wsr-lib': 'error' works too, but old config uses numbers.correct// In .eslintrc: "rules": { "wix-style-react/no-full-wsr-lib": 2 } - ESLint (peer dependency) wrong
const eslint = import('eslint'); // dynamic import not typical for configcorrectconst eslint = require('eslint');
Quickstart
{
"plugins": ["wix-style-react"],
"rules": {
"wix-style-react/no-full-wsr-lib": "error"
}
}