semistandard-loader

raw JSON →
0.0.4 verified Fri May 01 auth: no javascript abandoned

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.

error Error: Cannot find module 'semistandard'
cause semistandard not installed or not in node_modules
fix
npm install semistandard --save-dev
error WARNING in ./index.js <text>:1:1: Expected space or tab after // in comment.
cause Semistandard linting errors reported as warnings by the loader
fix
Fix the reported linting issues or disable the loader for that file.
error Module build failed: SyntaxError: Unexpected token (1:9)
cause 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).
error Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
cause Using preLoaders with webpack 2+
fix
Migrate to webpack 2+ configuration: use module.rules with enforce: 'pre'.
gotcha preLoaders 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.
deprecated Package has no updates since 2016; semistandard itself may have breaking changes.
fix Consider migrating to eslint-loader with eslint-config-semistandard for modern webpack.
gotcha The '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.
breaking Node.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.
npm install semistandard-loader
yarn add semistandard-loader
pnpm add semistandard-loader

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;