Rollup plugin to lint stylus with stylint
npm install rollup-plugin-stylint -D
import { rollup } from 'rollup';
import stylint from 'rollup-plugin-stylint';
rollup({
entry: 'index.js',
plugins: [
stylint()
]
});
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'
})
]
});
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.
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'
})
]
});
MIT © Andrew Smirnov