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.
eslint-plugin-svg-jsx
✓ // In .eslintrc.js:
plugins: ['svg-jsx']
✗ // Wrong: using require in plugins array
plugins: [require('eslint-plugin-svg-jsx')]
ESLint plugins are specified by name only; the plugin is resolved from node_modules.
camel-case-dash
✓ rules: { 'svg-jsx/camel-case-dash': 'error' }
✗ rules: { 'svg-jsx/camel-case-dash': 2 } // numeric severity is deprecated
Rule name uses hyphens; set severity as 'error' or 'warn' string.
camel-case-colon
✓ rules: { 'svg-jsx/camel-case-colon': 'error' }
✗ rules: { 'svg-jsx/camel-case-colon': ['error', { something: true }] } // no options available
Rule has no options; passing extra config may cause ESLint errors.
no-style-string
✓ rules: { 'svg-jsx/no-style-string': 'error' }
✗ rules: { 'svg-jsx/no-style-string': 1 } // numeric severity is deprecated
Prevents string style attributes; use JSX style object instead.
Configures ESLint with all three SVG JSX rules enforcing camelCase props.
// .eslintrc.js
module.exports = {
plugins: ['svg-jsx'],
rules: {
'svg-jsx/camel-case-dash': 'error',
'svg-jsx/camel-case-colon': 'error',
'svg-jsx/no-style-string': 'error',
},
};
Errors
Common errors & fixes
ESLint couldn't find the plugin "eslint-plugin-svg-jsx".
Plugin not installed or missing from node_modules.
fixRun `npm install --save-dev eslint-plugin-svg-jsx` or `yarn add -D eslint-plugin-svg-jsx`.
Configuration for rule "svg-jsx/camel-case-dash" is invalid: Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '"error"').
Using string 'error' with an old version of ESLint (<7) that requires numeric severity.
fixUpgrade ESLint to >=8 or use numeric severity (2) for older ESLint.
Audit
Dependencies
eslintrequiredPeer dependency; plugin requires ESLint >=8 to function as an ESLint plugin.