Skip to content

A Gulp plugin that generates a checkstyle report from stylelint results.

License

Notifications You must be signed in to change notification settings

olegskl/gulp-stylelint-checkstyle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-stylelint-checkstyle

Build Status Code Climate

A Gulp plugin that generates a checkstyle report from stylelint results.

Deprecated

Use gulp-stylelint with gulp-stylelint-checkstyle-reporter instead.

Installation

npm install gulp-stylelint-checkstyle --save-dev

Quick start

With gulp-stylelint-checkstyle, it's easy to start generate a CSS lint report for Jenkins checkstyle plugin.

If you already have a .stylelintrc file in your project directory:

gulp.task('lint-css', function lintCssTask() {
  return gulp
    .src('src/**/*.css')
    .pipe(gulpStylelintCheckstyle({
      output: 'reports/lint/lint-css.xml'
    }));
});

Options

Below is an example with all available options provided:

gulp.task('lint-css', function lintCssTask() {
  return gulp
    .src('src/**/*.css')
    .pipe(gulpStylelintCheckstyle({
      stylelint: {
        extends: 'stylelint-config-suitcss'
      },
      output: 'reports/lint/lint-css.xml',
      reportToConsole: true,
      failAfterAllErrors: true
    }));
});

stylelint (Object)

See stylelint configuration options.

output (String) default: "./checkstyle.xml"

Relative or absolute path to the report output file, e.g. "reports/lint/lint-css.xml"

reportToConsole (Boolean) default: false

Setting this option to true will report all issues to the console as well (the checkstyle report file will still be written).

failAfterAllErrors (Boolean) default: false

Setting this option to true will wait for all reporters to finish and then terminate the process with an error code 1 if linting issues (errors or warnings) have been found.

License

http://opensource.org/licenses/mit-license.html

About

A Gulp plugin that generates a checkstyle report from stylelint results.

Resources

License

Stars

Watchers

Forks

Packages

No packages published