Skip to content

Help making my old wrapper.js work with the latest jslint.mjs #367

Answered by kaizhu256
AlbertWiersch asked this question in Q&A
Discussion options

You must be logged in to vote

here's a new wrapper2.js that does mostly what you want. note the old options indent, maxerr, maxlen, predef were removed from jslint (since ~2015). please goto https://www.jslint.com to checkup on the latest options.

#!/usr/bin/env node
/*
 * wrapper2.js
 *
 * CommonJS command-line wrapper for jslint.mjs
 *
 * Example usage:

node wrapper2.js --for --long --globals=caches,indexedDb --maxerr=20 jquery.js

 */

/*jslint beta, indent2, node*/

(async function () {
  var file;
  var globals = [];
  var jslint;
  var maxerr = Infinity;
  var options = {};
  var result;
  var source;

// Import JSLint.

  jslint = await import("./jslint.mjs");
  jslint = jslint.default;

// Parse process.argv.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AlbertWiersch
Comment options

@kaizhu256
Comment options

Answer selected by AlbertWiersch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants