jscs
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -120,3 +120,3 @@ var assert = require('assert'); | ||
*/ | ||
this._defaultExcludedFileMasks = ['.git/**', '*/node_modules/**']; | ||
this._defaultExcludedFileMasks = ['.git/**', 'node_modules/**']; | ||
@@ -382,2 +382,26 @@ /** | ||
Configuration.prototype._errorOnRemovedOptions = function(config) { | ||
var errors = ['Config values to remove in 3.0:']; | ||
if (config.hasOwnProperty('esprima')) { | ||
errors.push('The `esprima` option since CST uses babylon (the babel parser) under the hood'); | ||
} | ||
if (config.hasOwnProperty('esprimaOptions')) { | ||
errors.push('The `esprimaOptions` option.'); | ||
} | ||
if (config.hasOwnProperty('esnext')) { | ||
errors.push('The `esnext` option is enabled by default.'); | ||
} | ||
if (config.hasOwnProperty('verbose')) { | ||
errors.push('The `verbose` option is enabled by default.'); | ||
} | ||
if (errors.length > 1) { | ||
throw new Error(errors.join('\n')); | ||
} | ||
}; | ||
/** | ||
@@ -398,2 +422,4 @@ * Processes configuration and returns config options. | ||
this._errorOnRemovedOptions(currentConfig); | ||
// NOTE: options is a separate object to ensure that future options must be added | ||
@@ -400,0 +426,0 @@ // to BUILTIN_OPTIONS to work, which also assures they aren't mistaken for a rule |
@@ -8,3 +8,3 @@ { | ||
"name": "jscs", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"main": "lib/checker", | ||
@@ -11,0 +11,0 @@ "homepage": "http://jscs.info", |
Sorry, the diff of this file is too big to display
808433
22437