Socket
Socket
Sign inDemoInstall

jscs

Package Overview
Dependencies
Maintainers
4
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jscs - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

18

lib/js-file.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc