Registry /
devops / stylelint-custom-processor-loader
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.
default
✓ import stylelintCustomProcessorLoader from 'stylelint-custom-processor-loader'
✗ const loader = require('stylelint-custom-processor-loader')
Loader is typically used in webpack config as string 'stylelint-custom-processor-loader', not imported directly. Node require works for runtime use, but ESM import is preferred for consistency.
default (config use)
✓ module.exports = { module: { rules: [ { test: /\.jsx?$/, loader: 'stylelint-custom-processor-loader', exclude: /node_modules/ } ] } }
✗ module.exports = { module: { rules: [ { test: /\.jsx?$/, use: 'stylelint-custom-processor-loader' } ] } }
Loader must come last (first executed) in the use array when combined with other loaders. Omitting 'exclude: /node_modules/' may cause errors. Common mistake: placing loader first in 'use' array.
options
✓ import stylelintCustomProcessorLoader from 'stylelint-custom-processor-loader';
// In webpack config:
{ loader: 'stylelint-custom-processor-loader', options: { configPath: './.my-stylelintrc' } }
✗ require('stylelint-custom-processor-loader').default
Options are passed via webpack's 'options' object, not imported. The npm package exports a single function, but direct import for options is not needed.
Shows webpack config integrating babel-loader and stylelint-custom-processor-loader, plus minimal .stylelintrc for styled-components.
// webpack.config.js
const path = require('path');
module.exports = {
entry: './src/index.js',
output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js' },
module: {
rules: [
{
test: /\.jsx?$/,
use: ['babel-loader', 'stylelint-custom-processor-loader'],
exclude: /node_modules/,
},
],
},
};
// .stylelintrc (in project root)
{
"processors": ["stylelint-processor-styled-components"],
"rules": { "declaration-colon-space-after": "always" }
}
Errors
Common errors & fixes
Error: Cannot find module 'stylelint'
Missing peer dependency stylelint.
fixRun: npm install --save-dev stylelint
Module build failed: Error: No configuration provided for stylelint-custom-processor-loader
Missing .stylelintrc or configPath option pointing to invalid config.
fixCreate a .stylelintrc file in project root or pass configPath option with valid path.
Error: Cannot find module 'stylelint-processor-styled-components'
Processor not installed or not specified in stylelint config.
fixInstall processor: npm install --save-dev stylelint-processor-styled-components, and add processors array to .stylelintrc.
Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type.
Loader order incorrect (babel-loader runs after this loader on non-JS output).
fixEnsure stylelint-custom-processor-loader is the last loader in the 'use' array (first executed).
Audit
Dependencies
stylelintrequiredPeer dependency: core linting engine required at runtime
webpackrequiredPeer dependency: loader interface required; webpack >=2