Registry / testing / semistandard-loader

semistandard-loader

JSON →
library0.0.4jsnpmunverified

A webpack pre-loader that runs Flet/semistandard (a semicolon-aware variant of JavaScript Standard Style) during builds. Version 0.0.4 is the latest and only stable release; no further updates have been made. It integrates seamlessly with webpack 1.x and standard's configuration options (e.g., parser). Unlike ESLint loaders, this enforces semistandard's specific style rules out of the box with minimal configuration.

npm install semistandard-loader
INSTALL
IMPORT
SIG · SEMISTANDARD-LOADE
S
semistandard-loader
testingjavascriptv0.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

config object
In webpack 1.x config: { module: { preLoaders: [{ test: /\.jsx?$/, loader: 'semistandard', exclude: /node_modules/ }] }, semistandard: { parser: 'babel-eslint' } }
Using 'loader: semistandard-loader' instead of 'loader: semistandard' (webpack resolves from loader name)
This loader is designed for webpack 1.x preLoaders. For webpack 2+, use enforce: 'pre' instead of preLoaders.
webpack require
var webpack = require('webpack');
import webpack from 'webpack'; (ESM import works, but this loader is CJS-only)
The loader itself is CommonJS; mixing with ESM may cause issues in older webpack.
plugin configuration
var config = { ... }; module.exports = config;
Using ES6 export default config; (not supported by webpack 1.x config files)
Webpack 1 expects module.exports; ES6 exports break the config.

Shows how to set up semistandard-loader as a preloader in a webpack 1 configuration file.

// webpack.config.js var webpack = require('webpack'); var config = { entry: './index.js', output: { filename: 'bundle.js' }, module: { preLoaders: [ { test: /\.jsx?$/, loader: 'semistandard', exclude: /(node_modules|bower_components)/ } ], loaders: [ // your other loaders ] }, semistandard: { // optional: parser: 'babel-eslint' } }; module.exports = config;
Debug
Known issues
gotchapreLoaders syntax is webpack 1 only; does not work with webpack 2+ (use enforce: 'pre' instead).
fix
Replace 'preLoaders' with 'rules' and add 'enforce: 'pre'' to the rule for semistandard.
affects: >=2.0.0
deprecatedPackage has no updates since 2016; semistandard itself may have breaking changes.
fix
Consider migrating to eslint-loader with eslint-config-semistandard for modern webpack.
affects: *
gotchaThe 'semistandard' key in config is not webpack standard; it's specific to this loader and may conflict with other loaders using similar keys.
fix
Prefix custom options with loader name or use module.rules options for better isolation.
affects: *
breakingNode.js 0.10/0.12 not supported by modern semistandard dependencies; loader requires Node >= 4.
fix
Upgrade Node.js to LTS (>= 4) or pin semistandard to an older version.
affects: >=1.0.0 (semistandard 10+)
Errors
Common errors & fixes
Error: Cannot find module 'semistandard'
semistandard not installed or not in node_modules
fix
npm install semistandard --save-dev
WARNING in ./index.js <text>:1:1: Expected space or tab after // in comment.
Semistandard linting errors reported as warnings by the loader
fix
Fix the reported linting issues or disable the loader for that file.
Module build failed: SyntaxError: Unexpected token (1:9)
Loader does not transpile code; it runs on raw source before transpilation
fix
Ensure the loader is placed as a pre-loader and that your source uses standard JS syntax or configure parser (e.g., babel-eslint).
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
Using preLoaders with webpack 2+
fix
Migrate to webpack 2+ configuration: use module.rules with enforce: 'pre'.
Upgrade
Version history
0.0.4latest on npm
Audit
Dependencies
webpackrequiredLoader interface required by webpack 1.x
semistandardrequiredCore linting engine that provides the standard rules plus semicolons
Agent activity
6 hits · last 30 days
node
6
Resources
semistandard-loader — npm install semistandard-loader · libregistry