Comparing version 1.4.0 to 1.5.0
10
index.js
@@ -27,7 +27,11 @@ 'use strict'; | ||
if (configPath) { | ||
if (Object.keys(options).length) { | ||
if (typeof options === 'object' && Object.keys(options).length) { | ||
throw new Error('configPath option is not compatible with code style options'); | ||
} | ||
checker.configure(loadConfigFile.load(configPath)); | ||
try { | ||
checker.configure(loadConfigFile.load(configPath)); | ||
} catch (error) { | ||
throw new Error('Unable to load JSCS config file at ' + path.join(process.cwd(), configPath)); | ||
} | ||
} else { | ||
@@ -73,3 +77,3 @@ checker.configure(options); | ||
} catch (err) { | ||
out.push(err.message.replace('null:', file.relative + ':')); | ||
out.push(err.stack.replace('null:', file.relative + ':')); | ||
} | ||
@@ -76,0 +80,0 @@ |
{ | ||
"name": "gulp-jscs", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Check JavaScript code style with jscs", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
# gulp-jscs [![Build Status](https://travis-ci.org/jscs-dev/gulp-jscs.svg?branch=master)](https://travis-ci.org/jscs-dev/gulp-jscs) | ||
> Check JavaScript code style with [jscs](https://github.com/jscs-dev/node-jscs) | ||
> Check JavaScript code style with [jscs](http://jscs.info) | ||
@@ -57,5 +57,5 @@ ![](screenshot.png) | ||
See the jscs [options](https://github.com/jscs-dev/node-jscs#options). | ||
See the jscs [options](http://jscs.info/overview.html#options). | ||
Alternatively you can set the `configPath` *(default: `'.jscsrc'`)* option to the path of a [.jscsrc](https://github.com/jscs-dev/node-jscs#configuration) file. | ||
Alternatively you can set the `configPath` *(default: `'.jscsrc'`)* option to the path of a [.jscsrc](http://jscs.info/rules.html) file. | ||
@@ -62,0 +62,0 @@ Set `esnext: true` if you want your code to be parsed as ES6 using the harmony |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5557
72