Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby gem driver for Douglas Crockford's jslint

tag: v0.6.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

jslintrb

Description

jslintrb is a packaged version of Douglas Crockford's JSLint JavaScript code checker.

jslintrb uses SpiderMonkey via the Johnson

Ruby gem to interpret the JSLint javascript.

Usage

jslintrb <javascript files to be checked>

You can provide .jslinrbrc files in the directory from which the command is run, the directory in which any file is found, and in any parent of that directory, to set jslint options. They are processed default first, then current directory, then ancestor directories, then the immediate parent. For example, I have a .jslintrbrc file in my top-level project directory that sets options for my project, then one in my spec directory (like a test directory) which adds the globals that exist for the tests but not for the core application code.

The file is JSON-formatted. See the jslint documentation (www.jslint.com/lint.html#options) for allowed options and an example at github.com/smparkes/env-js/blob/envjsrb/.jslintrbrc.

Differences from upstream

JSLint warns against using new to be evaluated soley for side-effects. jslintrb allows this if you set the “newside” option.

Upstream doesn't support ECMAScript 5 getters and setters. Nick Galbreath (blog.client9.com/) had the idea of just using a regexp to mangle the common cases for the purposes of jslint until upstream suports them. You can do this now in jslintrb by setting the “gettersetter” option to true. Note that this option has to be turned on in a .jslintrbrc file; it can't be turned on with inline comments.

Copyright

jslintrb copyright © 2010 Steven Parkes. See LICENSE for details. jslint copyright © 2002 Douglas Crockford. See lib/jslintrb/fulljslint.js for details.

Something went wrong with that request. Please try again.