Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

Able to passed parameters to sasslint directly #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -64,4 +64,4 @@ function lint(input, options) {
return fileReport;
}

module.exports = lint;
module.exports = lint;