Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jshint

Package Overview
Dependencies
Maintainers
2
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jshint - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

2

lib/cli.js

@@ -52,3 +52,3 @@ var fs = require('fs'),

function _findConfig(target) {
function _findConfig() {
var name = ".jshintrc",

@@ -55,0 +55,0 @@ projectConfig = _searchFile(name),

@@ -12,4 +12,11 @@ var fs = require('fs'),

var buffer,
globals,
lintdata;
// config may be a pointer, but we modify it below, which changes it the next time it is used.
config = !config ? {} : Object.keys(config).reduce(function (obj, key) {
obj[key] = config[key];
return obj;
}, {});
try {

@@ -25,3 +32,9 @@ buffer = fs.readFileSync(file, 'utf-8');

if (!jshint.JSHINT(buffer, config)) {
// remove custom node-jshint option
if (config.globals) {
globals = config.globals;
delete config.globals;
}
if (!jshint.JSHINT(buffer, config, globals)) {
jshint.JSHINT.errors.forEach(function (error) {

@@ -28,0 +41,0 @@ if (error) {

module.exports = {
reporter: function (results, data) {
reporter: function (results) {
var len = results.length,

@@ -4,0 +4,0 @@ str = '',

/*jshint node: true */
module.exports =
{
reporter: function (results, data, done) {
reporter: function (results, data) {
var len = results.length,

@@ -6,0 +6,0 @@ str = '',

{
"name": "jshint",
"version": "0.8.1",
"version": "0.8.2",
"description": "A CLI for JSHint",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/jshint/node-jshint",

@@ -45,4 +45,11 @@ # node-jshint

The CLI uses the default options that come with JSHint. To have your own configuration apply, there are several methods you can use:
The CLI uses the default options that come with JSHint.
Only one extra option is unique to node-jshint: `globals`
allows you to define an object of globals that get ignored for every file.
To see an example you can look at how whitelisted globals are defined
in the [jshint code](https://github.com/jshint/jshint/blob/c047ea1b01097fcc220fcd1a55c41f67ae2e6e81/jshint.js#L556)
To have your own configuration apply, there are several methods you can use:
### Specify Manually

@@ -49,0 +56,0 @@

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