in tasks/check-security-js.js [48:66]
function checkSecurityJS (path, logger) {
// function checkSecurityJS (path) {
path = path || "**/*.js";
return gulp.src(path)
// .pipe(using({prefix:'Checking', path:'relative', color:'green'}))
// eslint() attaches the lint output to the "eslint" property
// of the file object so it can be used by other modules.
.pipe(eslint(__dirname+'/../config/.scanjs-eslintrc'))
// Alternative formatter
.pipe(eslint.result(result => {
result.messages.forEach((item)=>{
if(item.severity === 1) logger.js.warning.push(populate(item))
if(item.severity === 2) logger.js.error.push(populate(item))
})
logger.js.message = result.messages;
// logger.js.path = result.filePath,
}));
}