Git Product home page Git Product logo

javascriptlint's Introduction

Overview

This is a fork of Matthias Miller's JavaScript Lint. For the original, see:

http://javascriptlint.com/

This tool has two important features that are uncommon among JavaScript lint tools:

  • It does not conflate style with lint. Style refers to arbitrary code formatting rules (like leading whitespace rules). Lint refers to potential program correctness issues (like missing "break" statements inside a switch). The line is certainly fuzzy, as in the case of JavaScript semicolon style, but that's why:

  • It's configurable. Each individual warning can be turned on or off, and warnings can be overridden for individual lines of code. This is essential for cases where potentially dangerous behavior is being deliberately used carefully.

If you want a style checker, see http://github.com/davepacheco/jsstyle.

Synopsis

# make install
...
# build/install/jsl
usage: jsl [options] [files]

options:
  -h, --help          show this help message and exit
  --conf=CONF         set the conf file
  --profile           turn on hotshot profiling
  --recurse           recursively search directories on the command line
  --enable-wildcards  resolve wildcards in the command line
  --dump              dump this script
  --unittest          run the python unittests
  --quiet             minimal output
  --verbose           verbose output
  --nologo            suppress version information
  --nofilelisting     suppress file names
  --nosummary         suppress lint summary
  --help:conf         display the default configuration file

You can define a configuration file for jsl to enable or disable particular warnings and to define global objects (like "window"). See the --help:conf option.

Supported Platforms

This branch of JSL has been tested on:

  • SmartOS (illumos-based), both 32-bit and 64-bit.
  • Mac OS X Snow Leopard, Lion, and Mountain Lion.
  • Debian Squeeze (6.0.5).

All of these use Python 2.6 or later.

History

This version forked from the Subversion repo at revision 302 (2011-04-06). I'll happily look at incorporating new patches from upstream, though the project has been pretty quiet for the last many months.

The main purpose of this fork is to fix building on illumos-based systems. Rather than fix the complex spidermonkey build system to work on illumos, I stripped out a bunch of unnecessary pieces and Makefiles and wrote a new set of Makefiles. The result now builds on Mac OS X and Linux as well.

javascriptlint's People

Contributors

davepacheco avatar melloc avatar trentm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.