// *************************************
//
//   Lint Tasks
//
// *************************************

// -------------------------------------
//   Modules
// -------------------------------------
//
// imagemin              : Image optimizer
var scssLint = require('gulp-scss-lint');
var cssLint = require('gulp-csslint');
var jsLint = require('gulp-jshint');

// NOTE:
// Since we lint multiple linting tasks but wanted to
// avoid the lint-js.js lint-css and so on naming all of the lint
// tasks run from this file.

var exports = module.exports = {};

// Unlike the other file this and tests tasks are called from array

exports.scss = function (gulp, config) {
    return gulp.src(config.lint.scss.targets)
        .pipe(scssLint());
};

exports.js = function (gulp, config) {
    return gulp.src(config.lint.js.targets)
        .pipe(jsLint())
        .pipe(jsLint.reporter(require('jshint-stylish')))
        //.pipe(jsLint.reporter('fail'))
};

exports.css = function (gulp, config) {
    return gulp.src(config.lint.css.targets)
        .pipe(cssLint())
        .pipe(cssLint.formatter(require('csslint-stylish')))
};