Skip to content

sandark7/rollup-plugin-stylint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-stylint

NPM version Dependency Status Code Climate

Rollup plugin to lint stylus with stylint

Installation

npm install rollup-plugin-stylint -D

Usage

import { rollup } from 'rollup';
import stylint from 'rollup-plugin-stylint';

rollup({
  entry: 'index.js',
  plugins: [
    stylint()
  ]
});

Options

configFile

Specify path to .stylintrc file with stylint options.

import { rollup } from 'rollup';
import stylint from 'rollup-plugin-stylint';

rollup({
  entry: 'index.js',
  plugins: [
    stylint({
      configFile: './.stylintrc'
    })
  ]
});

config

Or specify stylint options inline.

import { rollup } from 'rollup';
import stylint from 'rollup-plugin-stylint';

rollup({
  entry: 'index.js',
  plugins: [
    stylint({
      config: {
        brackets: 'always',
        namingConvention: 'BEM',
        semicolons: 'always'
      }
    })
  ]
});

Also config overrides configFile option.

reporter

You can use custom reporter for better console output.

import { rollup } from 'rollup';
import stylint from 'rollup-plugin-stylint';

rollup({
  entry: 'index.js',
  plugins: [
    stylint({
      reporter: 'stylint-stylish'
    })
  ]
});

License

MIT © Andrew Smirnov

About

Rollup plugin to lint stylus with stylint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published