Socket
Socket
Sign inDemoInstall

jscs

Package Overview
Dependencies
197
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

.travis.yml

2

lib/checker.js

@@ -20,2 +20,3 @@ var esprima = require('esprima');

this.registerRule(new (require('./rules/require-curly-braces'))());
this.registerRule(new (require('./rules/require-multiple-var-decl'))());
this.registerRule(new (require('./rules/disallow-multiple-var-decl'))());

@@ -35,2 +36,3 @@ this.registerRule(new (require('./rules/require-space-after-keywords'))());

this.registerRule(new (require('./rules/validate-jsdoc'))());
this.registerRule(new (require('./rules/disallow-yoda-conditions'))());
},

@@ -37,0 +39,0 @@ configure: function(config) {

13

lib/cli.js

@@ -19,6 +19,7 @@ var fs = require('fs');

checker.configure(require(configPath));
Vow.all(program.args.map(function(path) {
return checker.checkPath(path);
})).then(function (results) {
var errorsCollection = [].concat.apply([], results);
if (program.args.length > 0) {
Vow.all(program.args.map(function(path) {
return checker.checkPath(path);
})).then(function (results) {
var errorsCollection = [].concat.apply([], results);
var errorCount = 0;

@@ -45,2 +46,6 @@ errorsCollection.forEach(function (errors) {

});
} else {
console.log('No input files specified. Try option --help for usage information.');
process.exit(0);
}
} else {

@@ -47,0 +52,0 @@ console.log('Configuration file ' + configPath + ' was not found.');

@@ -5,3 +5,3 @@ {

"name" : "jscs",
"version" : "0.0.3",
"version" : "0.0.4",
"repository" : "https://github.com/mdevils/jscs",

@@ -8,0 +8,0 @@ "contributors" : [

@@ -1,2 +0,2 @@

node-jscs
node-jscs [![Build Status](https://travis-ci.org/mdevils/node-jscs.png?branch=master)](https://travis-ci.org/mdevils/node-jscs)
=========

@@ -94,2 +94,18 @@

/*
Option: require_multiple_var_decl
Requires multiple var declaration.
Valid example:
var x = 1,
y = 2;
Invalid example:
var x = 1;
var y = 2;
*/
"require_multiple_var_decl": true,
/*
Option: disallow_left_sticked_operators

@@ -159,3 +175,3 @@ Disallows sticking operators to the left.

x = String(y);
x = ~s.indexOf('.');
x = s.indexOf('.') !== -1;

@@ -167,3 +183,3 @@ Invalid example:

x = '' + y;
x = s.indexOf('.') !== -1;
x = ~s.indexOf('.');
*/

@@ -170,0 +186,0 @@ "disallow_implicit_type_conversion": ["numeric", "boolean", "binary", "string"],

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc