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

coffee-jshint

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee-jshint - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [1.2.0](https://github.com/marviq/coffee-jshint/compare/v1.1.3...v1.2.0) (2020-03-16)
### Features
* **cli:** replace deprecated `optimist` with `commander` ([09bc488](https://github.com/marviq/coffee-jshint/commit/09bc488e2938e39a34709efd4162b2f3380cfb75))
### [1.1.3](https://github.com/marviq/coffee-jshint/compare/v1.1.2...v1.1.3) (2020-03-14)

@@ -7,0 +14,0 @@

100

cli.js
#!/usr/bin/env node
// Generated by CoffeeScript 2.4.1
var _, argv, coffee, errors, help, hintFiles, other, splitArgs;
// Generated by CoffeeScript 2.5.1
var _, coffee, commander, errors, hintFiles, options, other, splitArgs;
commander = require('commander');
_ = require('underscore');

@@ -9,66 +11,38 @@

({argv, help} = require('optimist').usage('$0 [options] filename.coffee ...').options({
options: {
alias: 'o',
describe: 'comma separated list of JSHint options to turn on'
},
'default-options-off': {
type: 'boolean',
describe: 'turns off default options'
},
globals: {
alias: 'g',
describe: 'comma separated list of global variable names to permit'
},
verbose: {
alias: 'v',
type: 'boolean',
describe: 'print more detailed output'
},
version: {
type: 'boolean',
describe: 'print the version'
},
help: {
alias: 'h',
type: 'boolean',
describe: 'print usage info'
commander.storeOptionsAsProperties(false).option('-o, --options <option>[,...]', 'comma separated list of JSHint options to turn on').option('--default-options-off', 'turns off default options').option('-g, --globals <global>[,...]', 'comma separated list of global variable names to permit').option('-v, --verbose', 'print more detailed output').version(require('./package.json').version).arguments('<filename.coffee...>').parse();
options = commander.opts();
console.log(options);
splitArgs = function(strList) {
var ref;
return (ref = strList != null ? strList.split(',') : void 0) != null ? ref : [];
};
//# Filter out non-coffee paths.
//#
({coffee, other} = _.groupBy(commander.args, function(path) {
if (/.+\.coffee$/.test(path)) {
return 'coffee';
} else {
return 'other';
}
}));
switch (false) {
case !argv.version:
console.log(require('./package.json').version);
break;
case !argv.help:
console.log(help());
break;
default:
splitArgs = function(strList) {
var ref;
return (ref = strList != null ? strList.split(',') : void 0) != null ? ref : [];
};
//# Filter out non-coffee paths.
//#
({coffee, other} = _.groupBy(argv._, function(path) {
if (/.+\.coffee$/.test(path)) {
return 'coffee';
} else {
return 'other';
}
}));
if (argv.verbose && (other != null ? other.length : void 0) > 0) {
console.log(`Skipping files that don't end in .coffee:\n${other.join('\n')}`);
}
errors = hintFiles(coffee, {
options: splitArgs(argv.options),
withDefaults: !argv['default-options-off'],
globals: splitArgs(argv.globals),
verbose: argv.verbose
}, true);
if (_.flatten(errors).length === 0) {
process.exit(0);
} else {
process.exit(1);
}
if (options.verbose && (other != null ? other.length : void 0) > 0) {
console.log(`Skipping files that don't end in .coffee:\n${other.join('\n')}`);
}
errors = hintFiles(coffee, {
options: splitArgs(options.options),
withDefaults: !options.defaultOptionsOff,
globals: splitArgs(options.globals),
verbose: !!options.verbose
}, true);
if (_.flatten(errors).length === 0) {
process.exit(0);
} else {
process.exit(1);
}

@@ -1,4 +0,6 @@

// Generated by CoffeeScript 2.4.1
var _, argv, coffee, errors, help, hintFiles, other, splitArgs;
// Generated by CoffeeScript 2.5.1
var _, coffee, commander, errors, hintFiles, options, other, splitArgs;
commander = require('commander');
_ = require('underscore');

@@ -8,66 +10,38 @@

({argv, help} = require('optimist').usage('$0 [options] filename.coffee ...').options({
options: {
alias: 'o',
describe: 'comma separated list of JSHint options to turn on'
},
'default-options-off': {
type: 'boolean',
describe: 'turns off default options'
},
globals: {
alias: 'g',
describe: 'comma separated list of global variable names to permit'
},
verbose: {
alias: 'v',
type: 'boolean',
describe: 'print more detailed output'
},
version: {
type: 'boolean',
describe: 'print the version'
},
help: {
alias: 'h',
type: 'boolean',
describe: 'print usage info'
commander.storeOptionsAsProperties(false).option('-o, --options <option>[,...]', 'comma separated list of JSHint options to turn on').option('--default-options-off', 'turns off default options').option('-g, --globals <global>[,...]', 'comma separated list of global variable names to permit').option('-v, --verbose', 'print more detailed output').version(require('./package.json').version).arguments('<filename.coffee...>').parse();
options = commander.opts();
console.log(options);
splitArgs = function(strList) {
var ref;
return (ref = strList != null ? strList.split(',') : void 0) != null ? ref : [];
};
//# Filter out non-coffee paths.
//#
({coffee, other} = _.groupBy(commander.args, function(path) {
if (/.+\.coffee$/.test(path)) {
return 'coffee';
} else {
return 'other';
}
}));
switch (false) {
case !argv.version:
console.log(require('./package.json').version);
break;
case !argv.help:
console.log(help());
break;
default:
splitArgs = function(strList) {
var ref;
return (ref = strList != null ? strList.split(',') : void 0) != null ? ref : [];
};
//# Filter out non-coffee paths.
//#
({coffee, other} = _.groupBy(argv._, function(path) {
if (/.+\.coffee$/.test(path)) {
return 'coffee';
} else {
return 'other';
}
}));
if (argv.verbose && (other != null ? other.length : void 0) > 0) {
console.log(`Skipping files that don't end in .coffee:\n${other.join('\n')}`);
}
errors = hintFiles(coffee, {
options: splitArgs(argv.options),
withDefaults: !argv['default-options-off'],
globals: splitArgs(argv.globals),
verbose: argv.verbose
}, true);
if (_.flatten(errors).length === 0) {
process.exit(0);
} else {
process.exit(1);
}
if (options.verbose && (other != null ? other.length : void 0) > 0) {
console.log(`Skipping files that don't end in .coffee:\n${other.join('\n')}`);
}
errors = hintFiles(coffee, {
options: splitArgs(options.options),
withDefaults: !options.defaultOptionsOff,
globals: splitArgs(options.globals),
verbose: !!options.verbose
}, true);
if (_.flatten(errors).length === 0) {
process.exit(0);
} else {
process.exit(1);
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"commander": "^5.0.0",
"jshint": "^2.11.0",
"optimist": "~0.6.1",
"semver": "^7.1.3",

@@ -57,3 +57,3 @@ "underscore": "^1.9.2"

},
"version": "1.1.3"
"version": "1.2.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