All Projects β†’ standard β†’ standard-loader

standard / standard-loader

Licence: ISC License
webpack loader for linting your code with https://github.com/feross/standard

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to standard-loader

graphql-loader
πŸ’ A webpack loader for .graphql documents
Stars: ✭ 60 (-9.09%)
Mutual labels:  webpack-loader
wrapcheck
A Go linter to check that errors from external packages are wrapped
Stars: ✭ 141 (+113.64%)
Mutual labels:  linter
dedupimport
Deduplicate named/unnamed imports that have the same import path in Go files
Stars: ✭ 20 (-69.7%)
Mutual labels:  linter
eslint-config-kingstinct-react-native
Eslint configuration for React-native based on Airbnb with some great tweaks
Stars: ✭ 23 (-65.15%)
Mutual labels:  linter
arduino-lint
Tool to check for problems with Arduino projects
Stars: ✭ 63 (-4.55%)
Mutual labels:  linter
vue-template-compiler-loader
Webpack loader to pre-compile Vue 2.0 templates
Stars: ✭ 26 (-60.61%)
Mutual labels:  webpack-loader
relint
General purpose RegEx based file linter.
Stars: ✭ 33 (-50%)
Mutual labels:  linter
sonar-gherkin-plugin
SonarQube Cucumber Gherkin Analyzer
Stars: ✭ 33 (-50%)
Mutual labels:  linter
robotframework-robocop
Tool for static code analysis of Robot Framework language
Stars: ✭ 112 (+69.7%)
Mutual labels:  linter
vscode-fortran-support
Fortran language support for Visual Studio Code
Stars: ✭ 49 (-25.76%)
Mutual labels:  linter
extra pedantic
Stricter Dart analyzer linter settings and best practices.
Stars: ✭ 28 (-57.58%)
Mutual labels:  linter
React-bookstore
Bookstore using google-book Apis made with reactjsπŸ”₯πŸš€
Stars: ✭ 14 (-78.79%)
Mutual labels:  webpack-loader
lancer
Turn your python code into a hideous mess. Ever heard of Black? This is the opposite.
Stars: ✭ 179 (+171.21%)
Mutual labels:  linter
atom-minimap-linter
Atom package to display linter markers on minimap
Stars: ✭ 26 (-60.61%)
Mutual labels:  linter
AutoBindings
Set of annotations that aims to make your Android development experience easier along with lint checks.
Stars: ✭ 15 (-77.27%)
Mutual labels:  linter
arcanist-linters
A collection of custom Arcanist linters
Stars: ✭ 64 (-3.03%)
Mutual labels:  linter
laravel-prose-linter
Syntax-aware proofreading for your Laravel application.
Stars: ✭ 91 (+37.88%)
Mutual labels:  linter
openapi-lint-vscode
OpenAPI 2.0/3.0.x intellisense, validator, linter, converter and resolver extension for Visual Studio Code
Stars: ✭ 47 (-28.79%)
Mutual labels:  linter
arduino-lint-action
GitHub Actions action to check Arduino projects for problems
Stars: ✭ 20 (-69.7%)
Mutual labels:  linter
mjml-loader
MJML loader for webpack
Stars: ✭ 27 (-59.09%)
Mutual labels:  webpack-loader

standard-loader

webpack loader for linting your code with JavaScript Standard Style

Build Status Standard - JavaScript Style Guide

NPM NPM

Installation

  • Install the desired version of standard alongside standard-loader.
npm install --save-dev standard-loader standard

Usage

webpack 2+

// webpack.config.js
const webpack = require('webpack')

const config = {
  // ...
  module: {
    rules: [
      {
        // set up standard-loader as a preloader
        enforce: 'pre',
        test: /\.jsx?$/,
        loader: 'standard-loader',
        exclude: /(node_modules|bower_components)/,
        options: {
          // config options to be passed through to standard e.g.
          parser: 'babel-eslint'
        }
      },
      // other loaders...
    ]
  }
}

webpack 1

webpack 1.x is no longer supported as of standard-loader version 6.0.0. PRs for webpack 1.x support will be accepted on the 5.x branch.

Configuration Options

{
  // Emit errors instead of warnings (default = false)
  error: false,
  // enable snazzy output (default = true)
  snazzy: true,
  // configure alternative checker e.g. 'standardx' (default = 'standard')
  standard: 'standard',
  // all other config options are passed through to standard e.g.
  parser: 'babel-eslint'
}

Example Input

//code not conforming to standard style

module.exports = function(a,b) {
    console.log( a, b);
}

Example Output

> webpack
Hash: c5c5efad42144b469dcd
Version: webpack 4.0.1
Time: 974ms
Built at: 2018-3-3 19:54:20
   Asset      Size  Chunks             Chunk Names
build.js  3.38 KiB  bundle  [emitted]  bundle
Entrypoint bundle = build.js
[./index.js] 592 bytes {bundle} [built] [1 warning]
       single entry ./index.js  bundle

WARNING in ./index.js

/Users/timoxley/Projects/standard-loader/example/index.js
  1:1   error  Expected space or tab after '//' in comment   spaced-comment
  3:26  error  Missing space before function parentheses     space-before-function-paren
  3:28  error  A space is required after ','                 comma-spacing
  4:1   error  Expected indentation of 2 spaces but found 4  indent
  4:16  error  There should be no spaces inside this paren   space-in-parens
  4:23  error  Extra semicolon                               semi
  6:1   error  More than 1 blank line not allowed            no-multiple-empty-lines

βœ– 7 problems

Licence

ISC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].