0.1.2 • Published 11 years ago

atropa-jslint v0.1.2

Weekly downloads
26
License
-
Repository
github
Last release
11 years ago

atropa-jslint

A node module wrapper for jslint.

All this does is export the jslint function, and allow you to update the jslint version easily, it's simple.

General use

See lib/jslint.js for full documentation on jslint.

var os = require('os');
var fs = require('fs');
var jslint = require('atropa-jslint');
var result = jslint.JSLINT(fs.readFileSync('somefile.js'));
if(result) {
    console.log('no errors found!');
} else {
    jslint.JSLINT.errors.forEach(function (error) {
        console.error(
            '* Error:' + os.EOL +
            '    Reason: ' + error.reason + os.EOL +
            '    Evidence: ' + error.evidence + os.EOL +
            '    Line: ' + error.line + os.EOL +
            '    Char: ' + error.character + os.EOL + os.EOL
        );
    });
}

Update to the latest JsLint version.

var jslint = require('atropa-jslint');
jslint.update();

Rollback to the previous JsLint version.

var jslint = require('atropa-jslint');
jslint.rollbackUpdate();
0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.9-2

11 years ago

0.0.9-1

11 years ago

0.0.9

11 years ago