From d45dca634e6badbe28ae36abc4580dbb0edb74b4 Mon Sep 17 00:00:00 2001 From: maks-z Date: Sat, 24 Jun 2017 11:49:21 +0500 Subject: [PATCH] Able to passed parameters to sasslint directly --- README.md | 1 + lib/linter.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b25ca4..40b405f 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ You can customize the lint settings via a `.sass-lint.yml` file. See [sasslint o * `failOnWarning`: Have Webpack's build process die on warning. Default: `false` * `failOnError`: Have Webpack's build process die on error. Default: `false` * `testing`: Quites output normally for testing purposes, Default: 'false' **Caution** do not use this unless you are catching errors via Webpack CLI! +* `sasslintCfg`: Parameters are passed directly to the SassLint ```js // Default settings diff --git a/lib/linter.js b/lib/linter.js index 404fb31..916e3b7 100644 --- a/lib/linter.js +++ b/lib/linter.js @@ -15,7 +15,7 @@ var formatter = require('./formatter'); */ function lint(input, options) { // Run sassLint via lintFiles, which takes a glob - var report = sassLint.lintFiles(input, {}, options.configFile); + var report = sassLint.lintFiles(input, options.sasslintCfg, options.configFile); var fileReport = []; if (report.length) { @@ -64,4 +64,4 @@ function lint(input, options) { return fileReport; } -module.exports = lint; \ No newline at end of file +module.exports = lint;