Socket
Socket
Sign inDemoInstall

jscs

Package Overview
Dependencies
Maintainers
1
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.0.10 to 1.0.11

lib/rules/disallow-space-after-prefix-unary-operators.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

Version 1.0.11:
* Prefix unary rules: `disallowSpaceAfterPrefixUnaryOperators`, `requireSpaceAfterPrefixUnaryOperators`.
* Postfix unary rules: `disallowSpaceBeforePostfixUnaryOperators`, `requireSpaceBeforePostfixUnaryOperators`.
Version 1.0.10:

@@ -2,0 +6,0 @@ * Reporter support — `console`, `text`, `checkstyle`.

2

lib/checker.js

@@ -9,3 +9,3 @@ var vowFs = require('vow-fs');

* Starts Code Style checking process.
*
*
* @name StringChecker

@@ -12,0 +12,0 @@ */

@@ -60,2 +60,8 @@ var esprima = require('esprima');

this.registerRule(new (require('./rules/disallow-space-before-postfix-unary-operators.js'))());
this.registerRule(new (require('./rules/require-space-before-postfix-unary-operators.js'))());
this.registerRule(new (require('./rules/disallow-space-after-prefix-unary-operators.js'))());
this.registerRule(new (require('./rules/require-space-after-prefix-unary-operators.js'))());
this.registerRule(new (require('./rules/disallow-space-before-binary-operators'))());

@@ -62,0 +68,0 @@ this.registerRule(new (require('./rules/require-space-before-binary-operators'))());

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

"name" : "jscs",
"version" : "1.0.10",
"version" : "1.0.11",
"repository" : "https://github.com/mdevils/node-jscs",

@@ -38,3 +38,4 @@ "contributors" : [

"jshint": "2.1.3",
"mocha": "1.11.0"
"mocha": "1.11.0",
"browserify": "2.35.0"
},

@@ -41,0 +42,0 @@ "bin" : {

@@ -352,2 +352,114 @@ node-jscs [![Build Status](https://travis-ci.org/mdevils/node-jscs.png?branch=master)](https://travis-ci.org/mdevils/node-jscs)

/*
Option: disallowSpaceAfterPrefixUnaryOperators
Requires sticking unary operators to the right.
Valid example:
x = !y; y = ++z;
Invalid example:
x = ! y; y = ++ z;
*/
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
/*
Option: requireSpaceAfterPrefixUnaryOperators
Disallows sticking unary operators to the right.
Valid example:
x = ! y; y = ++ z;
Invalid example:
x = !y; y = ++z;
*/
"requireSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
/*
Option: disallowSpaceBeforePostfixUnaryOperators
Requires sticking unary operators to the left.
Valid example:
x = y++; y = z--;
Invalid example:
x = y ++; y = z --;
*/
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
/*
Option: requireSpaceBeforePostfixUnaryOperators
Disallows sticking unary operators to the left.
Valid example:
x = y ++; y = z --;
Invalid example:
x = y++; y = z--;
*/
"requireSpaceBeforePostfixUnaryOperators": ["++", "--"],
/*
Option: disallowSpaceBeforeBinaryOperators
Requires sticking binary operators to the left.
Valid example:
x+ y;
Invalid example:
x + y;
*/
"disallowSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
/*
Option: requireSpaceBeforeBinaryOperators
Disallows sticking binary operators to the left.
Valid example:
x !== y;
Invalid example:
x!== y;
*/
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
/*
Option: disallowSpaceAfterBinaryOperators
Requires sticking binary operators to the right.
Valid example:
x +y;
Invalid example:
x+ y;
*/
"disallowSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
/*
Option: requireSpaceAfterBinaryOperators
Disallows sticking binary operators to the right.
Valid example:
x + y;
Invalid example:
x +y;
*/
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
/*
Option: disallowImplicitTypeConversion

@@ -354,0 +466,0 @@ Disallows implicit type conversion.

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