From 956dd1ff7a90a3528c4f7fcc17711ce065ce0e15 Mon Sep 17 00:00:00 2001 From: superjang Date: Wed, 31 Jul 2019 20:26:01 +0900 Subject: [PATCH] Add 'force' attribute to options. - The attribute allows the user to choose whether to task fail or not. --- tasks/sass-lint.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tasks/sass-lint.js b/tasks/sass-lint.js index 1bd20fe..6d221ae 100755 --- a/tasks/sass-lint.js +++ b/tasks/sass-lint.js @@ -7,6 +7,7 @@ module.exports = function (grunt) { grunt.registerMultiTask('sasslint', 'Lint your Sass', function () { var opts = this.options({ + force: true, configFile: '' }); var results = []; @@ -26,7 +27,10 @@ module.exports = function (grunt) { } else { grunt.log.writeln(resultFormat); } - if (errorCount.count > 0) grunt.fail.warn(''); + + if(opts.force){ + if (errorCount.count > 0) grunt.fail.warn(''); + } } }); };