Socket
Socket
Sign inDemoInstall

jscs

Package Overview
Dependencies
9
Maintainers
3
Versions
95
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.6 to 1.5.7

jscs-browser.js

26

lib/checker.js

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

if (!_this._isExcluded(path) && _this._hasCorrectExtension(path)) {
if (!_this._isExcluded(path)) {
return vowFs.read(path, 'utf8').then(function(data) {

@@ -53,17 +53,6 @@ return _this.checkString(data, path);

return null;
};
var defer = Vow.defer();
defer.resolve(null);
/**
* Should replace Checker#checkFile method in 2.0 since it would be a breaking change
*
* @param {String} path
* @returns {Promise * Errors}
*/
Checker.prototype._checkFile = function(path) {
var _this = this;
return vowFs.read(path, 'utf8').then(function(data) {
return _this.checkString(data, path);
});
return defer.promise();
};

@@ -94,2 +83,6 @@

if (!_this._hasCorrectExtension(fullname)) {
return [];
}
return Vow.when(_this.checkFile(fullname)).then(function(errors) {

@@ -118,2 +111,3 @@ if (errors) {

var _this = this;
return vowFs.exists(path).then(function(exists) {

@@ -129,3 +123,3 @@ if (!exists) {

return _this._checkFile(path).then(function(errors) {
return _this.checkFile(path).then(function(errors) {
if (errors) {

@@ -132,0 +126,0 @@ return [errors];

@@ -31,3 +31,3 @@ var assert = require('assert');

if (lines[startLine] === lines[closingLine]) {
if (startLine === closingLine) {
return;

@@ -34,0 +34,0 @@ }

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

"name": "jscs",
"version": "1.5.6",
"version": "1.5.7",
"main": "lib/checker",

@@ -62,4 +62,5 @@ "homepage": "https://github.com/mdevils/node-jscs",

"presets",
"LICENSE"
"LICENSE",
"jscs-browser.js"
]
}

@@ -18,6 +18,8 @@ {

"switch",
"case",
"return",
"try",
"catch",
"function"
"function",
"typeof"
],

@@ -24,0 +26,0 @@ "requireSpaceBeforeBlockStatements": true,

@@ -33,3 +33,10 @@ {

],
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBinaryOperators": [
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
"&=", "|=", "^=",
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
"|", "^", "&&", "||", "===", "==", ">=",
"<=", "<", ">", "!=", "!=="
],
"requireSpaceAfterBinaryOperators": true,

@@ -36,0 +43,0 @@

@@ -2509,6 +2509,8 @@ # node-jscs [![Build Status](https://travis-ci.org/mdevils/node-jscs.svg?branch=master)](https://travis-ci.org/mdevils/node-jscs) [![Dependency Status](https://david-dm.org/mdevils/node-jscs.svg?theme=shields.io)](https://david-dm.org/mdevils/node-jscs) [![devDependency Status](https://david-dm.org/mdevils/node-jscs/dev-status.svg?theme=shields.io)](https://david-dm.org/mdevils/node-jscs#info=devDependencies)

File [jscs-browser.js](jscs-browser.js) contains browser-compatible version of `jscs`.
The npm package contains a file named `jscs-browser.js` (since version `1.5.7`), which is a browser compatible version of `jscs`.
Download and include `jscs-browser.js` into your page.
If you'd like to generate this file yourself, run `npm browserify` after cloning this repo.
Use `jscs-browser.js` on your page as follows:
```html

@@ -2515,0 +2517,0 @@ <script src="jscs-browser.js"></script>

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