Comparing version 1.8.0 to 1.8.1
@@ -56,7 +56,5 @@ var treeIterator = require('./tree-iterator'); | ||
var tokenPos = _this.getTokenPosByRangeStart(node.range[0]); | ||
if (tokenPos !== undefined) { | ||
var token = _this._tree.tokens[tokenPos]; | ||
if (token.type === 'Keyword') { | ||
token.type = 'Identifier'; | ||
} | ||
var token = _this._tree.tokens[tokenPos]; | ||
if (token.type === 'Keyword') { | ||
token.type = 'Identifier'; | ||
} | ||
@@ -90,9 +88,9 @@ } | ||
/** | ||
* returns whether a specific rule is disabled on the given line. | ||
* Returns whether a specific rule is disabled on the given line. | ||
* | ||
* @param {String} rule the rule name being tested | ||
* @param {String} ruleName the rule name being tested | ||
* @param {Number} line the line number being tested | ||
* @returns {Boolean} true if the rule is enabled | ||
*/ | ||
isEnabledRule: function(rule, line) { | ||
isEnabledRule: function(ruleName, line) { | ||
var enabled = true; | ||
@@ -106,3 +104,3 @@ this._disabledRuleIndex.some(function(region) { | ||
if (region.rule === rule || region.rule === '*') { | ||
if (region.rule === ruleName || region.rule === '*') { | ||
enabled = region.enabled; | ||
@@ -280,3 +278,3 @@ } | ||
* @param {Function} cb | ||
* @param {Function} [tree] | ||
* @param {Object} [tree] | ||
*/ | ||
@@ -283,0 +281,0 @@ iterate: function(cb, tree) { |
@@ -19,3 +19,3 @@ var utils = require('util'); | ||
/** | ||
* Requires to have whitespace between specified tokens. | ||
* Requires to have whitespace between specified tokens. Ignores newlines. | ||
* | ||
@@ -32,3 +32,3 @@ * @param {Object} options.token | ||
var spaces = options.spaces; | ||
if (nextToken.loc.start.line !== token.loc.end.line || | ||
if (nextToken.loc.start.line === token.loc.end.line && | ||
(nextToken.loc.start.column - token.loc.end.column) !== spaces | ||
@@ -35,0 +35,0 @@ ) { |
@@ -5,3 +5,3 @@ { | ||
"name": "jscs", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"main": "lib/checker", | ||
@@ -8,0 +8,0 @@ "homepage": "https://github.com/jscs-dev/node-jscs", |
@@ -3460,3 +3460,3 @@ # node-jscs | ||
Enable validation of separators between function parameters. | ||
Enable validation of separators between function parameters. Will ignore newlines. | ||
@@ -3467,5 +3467,6 @@ Type: `String` | ||
- `", "`: function parameters are immediately followed by a comma then a space | ||
- `" ,"`: function parameters are immediately followed by a space then a comma | ||
- `" , "`: function parameters are immediately followed by a space, a comma then a space | ||
- `","`: function parameters are immediately followed by a comma | ||
- `", "`: function parameters are immediately followed by a comma and then a space | ||
- `" ,"`: function parameters are immediately followed by a space and then a comma | ||
- `" , "`: function parameters are immediately followed by a space, a comma, and then a space | ||
@@ -3472,0 +3473,0 @@ #### Example |
Sorry, the diff of this file is too big to display
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
3661
998465
126
25062