Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

stylint/stylint-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stylint-loader Build Status

stylint loader for webpack

UNMAINTAINED Look at the issue #9

Install

Install the stylint peerDependency manually (only if you're using npm v3 or earlier)

npm install --save-dev stylint

Install stylint-loader package

npm install stylint-loader

Usage

Documentation: Using loaders

When using with stylus-loader, make sure they are in correct order

module.exports = {
  // ...
  module: {
    loaders: [
      {
        test: /\.styl$/, 
        loader: 'stylint'
      },
      {
        test: /\.styl$/,
        loader: 'style!css!stylus'
      }
    ]
  }
  // ...
}

To be safe, you can use preLoaders section to check source files, not modified by stylus-loader

module.exports = {
  // ...
  module: {
    preLoaders: [
      {
        test: /\.styl$/, 
        loader: 'stylint'
      }
    ]
  }
  // ...
}

Options

You can pass stylint options directly by

  • Adding a query string to the loader for this loader usabe only
{
  module: {
    preLoaders: [
      {
        test: /\.js$/,
        loader: 'stylint-loader?{brackets: "never"}',
        exclude: /node_modules/,
      },
    ],
  },
}
  • Adding an stylint entry in your webpack config for global options:
module.exports = {
  stylint: {
    config: 'path/.stylintrc'
  }
}

Note that you can use both method in order to benefit from global & specific options

About

(UNMAINTAINED) stylint loader for webpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published