Registry / testing / standard-loader

standard-loader

JSON →
library7.0.0jsnpmunverified

A webpack loader that lints JavaScript code using JavaScript Standard Style (standard). Version 7.0.0 is current, with maintenance as needed. It integrates with webpack 2+ (webpack 1 dropped in v6). Key differentiators: leverages the popular 'standard' style guide, supports custom parsers like babel-eslint, emits detailed warnings/errors with snazzy output, and follows the conventional module format for webpack loaders.

npm install standard-loader
INSTALL
IMPORT
SIG · STANDARD-LOADER
S
standard-loader
testingjavascriptv7.0.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

loader
✓ import 'standard-loader'
✗ const standardLoader = require('standard-loader')
No direct import needed; use as loader in webpack config.
webpack config
✓ module.exports = { module: { rules: [ { enforce: 'pre', test: /\.jsx?$/, loader: 'standard-loader', options: {} } ] } }
✗ module.exports = { module: { loaders: [ { test: /\.jsx?$/, loader: 'standard' } ] } }
Use 'rules' array, not 'loaders'. 'enforce: pre' for preloader.
options
✓ options: { parser: 'babel-eslint', error: false, snazzy: true, standard: 'standard' }
✗ options: { parser: 'babel-eslint', emitErrors: true }
Option 'error' toggles error/warning; 'snazzy' controls output formatting.

Configure standard-loader as a webpack preloader to lint .js and .jsx files using Standard style with optional parser.

// webpack.config.js module.exports = { module: { rules: [ { enforce: 'pre', test: /\.jsx?$/, loader: 'standard-loader', exclude: /node_modules/, options: { parser: 'babel-eslint', snazzy: true } } ] } };
standard --version
Debug
Known issues
breakingwebpack 1 support dropped in version 6.0.0. Use 5.x branch for webpack 1.
fix
Upgrade to webpack 2+ or use standard-loader@5.x.
affects: >=6.0.0
deprecatedOption 'emitErrors' is deprecated; use 'error' instead.
fix
Replace 'emitErrors: true' with 'error: true'.
affects: >=6.0.0
gotchaLoader must be placed in 'rules' array, not 'loaders'.
fix
Use module.rules, not module.loaders.
affects: >=6.0.0
gotchastandard must be installed as a peer dependency; not included automatically.
fix
Run 'npm install --save-dev standard-loader standard'.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'standard'
Missing peer dependency 'standard'.
fix
npm install --save-dev standard
Module build failed: Error: No matching loader for 'standard-loader'
Loader not configured in webpack rules.
fix
Add standard-loader to module.rules with enforce: 'pre'.
WARNING: Failed to load parser 'babel-eslint'
Parser not installed.
fix
npm install --save-dev babel-eslint
Upgrade
Version history
7.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
6
Resources
standard-loader — npm install standard-loader · libregistry