# stylint-loader

> stylint loader (for webpack)

Latest version **1.0.0** (published 2016-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install stylint-loader
pnpm add stylint-loader
yarn add stylint-loader
bun add stylint-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-01-30 |
| First published | 2015-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Alex Guerrero |
| Maintainers | guerrero |
| Keywords | stylint, lint, loader, webpack, stylus, linter |

## Links

- npm: https://www.npmjs.com/package/stylint-loader
- Repository: https://github.com/guerrero/stylint-loader
- Homepage: https://github.com/guerrero/stylint-loader#readme
- Issues: https://github.com/guerrero/stylint-loader/issues
- npm.io page: https://npm.io/package/stylint-loader

## Dependencies (2)

- [loader-utils](https://npm.io/package/loader-utils.md) ^0.2.11
- [object-assign](https://npm.io/package/object-assign.md) ^3.0.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-01-30
- 0.2.0 — 2015-09-08
- 0.1.1 — 2015-08-11
- 0.1.0 — 2015-08-03

## README

# stylint-loader [![Build Status](https://travis-ci.org/guerrero/stylint-loader.svg?branch=master)](https://travis-ci.org/guerrero/stylint-loader)

> stylint loader for [webpack](http://webpack.github.io/)


## Install

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

```bash
npm install --save-dev stylint
```

Install `stylint-loader` package

```bash
npm install stylint-loader
```


## Usage

[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)

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

```javascript
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`

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


### Options

You can pass [stylint options](https://github.com/rossPatton/stylint#options) directly by

- Adding a query string to the loader for this loader usabe only

```js
{
  module: {
    preLoaders: [
      {
        test: /\.js$/,
        loader: 'stylint-loader?{brackets: "never"}',
        exclude: /node_modules/,
      },
    ],
  },
}
```

- Adding an `stylint` entry in your webpack config for global options:

```js
module.exports = {
  stylint: {
    config: 'path/.stylintrc'
  }
}
```

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


## [License](LICENSE)

---
_Source: https://npm.io/package/stylint-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
