在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):olegskl/gulp-stylelint开源软件地址(OpenSource Url):https://github.com/olegskl/gulp-stylelint开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-stylelintA Gulp plugin that runs stylelint results through a list of reporters. Installationnpm install stylelint gulp-stylelint --save-dev Quick startOnce you have configured stylelint (e.g. you have a .stylelintrc file), start with the following code. You will find additional configuration options below. const gulp = require('gulp');
gulp.task('lint-css', function lintCssTask() {
const gulpStylelint = require('gulp-stylelint');
return gulp
.src('src/**/*.css')
.pipe(gulpStylelint({
reporters: [
{formatter: 'string', console: true}
]
}));
}); FormattersBelow is the list of currently available stylelint formatters. Some of them are bundled with stylelint by default and exposed on
Optionsgulp-stylelint supports all stylelint options except const gulp = require('gulp');
gulp.task('lint-css', function lintCssTask() {
const gulpStylelint = require('gulp-stylelint');
const myStylelintFormatter = require('my-stylelint-formatter');
return gulp
.src('src/**/*.css')
.pipe(gulpStylelint({
failAfterError: true,
reportOutputDir: 'reports/lint',
reporters: [
{formatter: 'verbose', console: true},
{formatter: 'json', save: 'report.json'},
{formatter: myStylelintFormatter, save: 'my-custom-report.txt'}
],
debug: true
}));
});
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论