diff --git a/docs/SASS.html b/docs/SASS.html index b376d58..1a80677 100644 --- a/docs/SASS.html +++ b/docs/SASS.html @@ -733,7 +733,7 @@
Parameters:
@@ -788,176 +788,6 @@
Example
- - - - -
-
-

lint(paths, callback)

- - -
-
- - -
-

Performs linting

-
- - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
paths - - -Array.<string> - - - - -

an array of paths to lint

callback - - -function - - - - -

a callback function

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- -
- - - - - - - -
- - - - - - - - - - - - - - - -
Example
- -
sass.lint(['/path/to/the/input/file.scss', '/lint/this/directory/too'], () => {
-  // successfully linted
-});
- - -
diff --git a/docs/SASS.js.html b/docs/SASS.js.html index 1fb6bb0..9e6cded 100644 --- a/docs/SASS.js.html +++ b/docs/SASS.js.html @@ -140,28 +140,6 @@

Source: SASS.js

this.linter = new SASSLint(...excludeLinter); } - /** - * Performs linting - * - * @memberof SASS - * @instance - * @method lint - * @param {Array<string>} paths - an array of paths to lint - * @param {Function} callback - a callback function - * @example - * sass.lint(['/path/to/the/input/file.scss', '/lint/this/directory/too'], () => { - * // successfully linted - * }); - */ - lint(paths: Array<string>, callback: () => void) { - this.linter.run(paths, linterErr => { - if (linterErr) { - return console.error(linterErr); - } - callback(); - }); - } - /** * Wraps {@link SASSCompiler#fe} to add linting * @@ -179,7 +157,7 @@

Source: SASS.js

* }); */ fe(inPath: string, outPath: string, lintPaths: Array<string> = [], callback: () => void = noop) { - this.lint(lintPaths.concat([inPath]), () => { + this.linter.run(lintPaths.concat([inPath]), () => { this.compiler.fe(inPath, outPath, callback); }); } diff --git a/docs/SASSLint.html b/docs/SASSLint.html index 2eeba82..42e5bb7 100644 --- a/docs/SASSLint.html +++ b/docs/SASSLint.html @@ -220,7 +220,7 @@
Parameters:
@@ -367,7 +367,7 @@
Parameters:
-

a callback function, accepts 1 argument: an error message or null

+

a callback function, executed only on success

@@ -412,7 +412,7 @@
Parameters:
diff --git a/docs/SASSLint.js.html b/docs/SASSLint.js.html index b2fcdc3..4eaeb11 100644 --- a/docs/SASSLint.js.html +++ b/docs/SASSLint.js.html @@ -91,7 +91,6 @@

Source: SASSLint.js

/* @flow */
 
-import type {NativeProcessCallback} from './typedef';
 import {NativeProcess} from './NativeProcess';
 import {join} from 'path';
 
@@ -145,7 +144,7 @@ 

Source: SASSLint.js

* @instance * @method run * @param {Array<string>} paths - an array of paths to files/directories to lint - * @param {Function} callback - a callback function, accepts 1 argument: an error message or null + * @param {Function} callback - a callback function, executed only on success * @example * // lint "style.scss" as well as the entire contents of the "sass" directory * linter.run([join(__dirname, 'style.scss'), join(__dirname, 'sass')], error => { @@ -155,13 +154,17 @@

Source: SASSLint.js

* // there were no linting errors * }); */ - run(paths: Array<string>, callback: NativeProcessCallback) { + run(paths: Array<string>, callback: () => void) { const args = paths.concat(['-c', config]); if (this.excludeLinter) { args.push('-x', this.excludeLinter); } - this.proc.run(callback, args); + this.proc.run(stderr => { + if (null === stderr) { + callback(); + } + }, args, {stdio: 'inherit'}); } } diff --git a/docs/quicksearch.html b/docs/quicksearch.html index 9822313..da1581f 100644 --- a/docs/quicksearch.html +++ b/docs/quicksearch.html @@ -7,7 +7,7 @@