Registry /
http-networking / eslint-plugin-react-jss
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
rules
✓ // In .eslintrc: { "plugins": ["react-jss"], "rules": { "react-jss/prefer-object": "warn" } }
✗ // Using "extends" instead of "plugins"
The plugin must be added to the 'plugins' array, not 'extends'.
Configures ESLint plugin and shows a React component using react-jss with injected styles.
// .eslintrc.json
{
"plugins": ["react-jss"],
"rules": {
"react-jss/prefer-object": "warn"
}
}
// Example React component with JSS
import React from 'react';
import injectSheet from 'react-jss';
const styles = {
button: {
backgroundColor: 'blue',
color: 'white',
padding: '10px 20px',
border: 'none',
borderRadius: '4px',
cursor: 'pointer'
}
};
const Button = ({ classes }) => (
<button className={classes.button}>Click me</button>
);
export default injectSheet(styles)(Button);
Errors
Common errors & fixes
ESLint couldn't find the plugin "eslint-plugin-react-jss".
Plugin not installed or not in node_modules.
fixRun npm install --save-dev eslint-plugin-react-jss
Audit
Dependencies
eslintoptionalPeer dependency; the plugin is loaded by ESLint.