Coder Social home page Coder Social logo

sublime-jslint's Introduction

JSLint support for Sublime Text 2 by using jslint4java

Sublime Text 2 is a sophisticated text editor for code, HTML and prose. You'll love its slick user interface and extraordinary features.

JSLint4Java is a Java wrapper around the fabulous tool by Douglas Crockford, JSLint. It provides a simple interface for detecting potential problems in JavaScript code.

This project is a plugin to add JSLint support for Sublime Text 2.

Features

  • JSLint: Run JSLint (Ctrl+J), or run JSLint on save
  • JSLint: Show JSLint results
  • Highlight error line by click in the result view
  • Cross-platform: supports Windows, Linux and Mac OS X

Requirements

Java - also ensure that it has been added to PATH

Installation

  • Using Package Control:
    • Install Package: sublime-jslint
  • Download and extract to Sublime Text 2 Packages folder
    • Windows: %APPDATA%\Sublime Text 2\Packages
    • Mac OS X: ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
    • Linux: ~/.config/sublime-text-2/Packages

How to use?

Open the Command Palette (Windows and Linux: Ctrl+Shift+P, OSX: Command+Shift+P), then search for:

  • JSLint: Run JSLint (Ctrl+J)
  • JSLint: Show JSLint Result

Open up a .js file and hit Ctrl+J to run JSLint. An new output panel will appear giving you the JSLint results:

Screenshots

Settings

Settings can be opened via the Command Palette, or via the Preferences/Package Settings/JSLint/Settings – User menu entry.

{
    //Uses system installed jslint.js (node.js based), instead of bundled JSLint jar
    "use_node_jslint": false,

    //Path to the jslint.js
    //Leave blank to use default JSLint path
    "node_jslint_path": "",

    //Options passed to jslint.js
    "node_jslint_options": "",

    //Path to the JSLint jar.
    //Leave blank to use bundled jar.
    "jslint_jar": "",

    //Options passed to JSLint.
    "jslint_options": "",

    //Errors and RegEx to be ignored
    "ignore_errors":
    [
        //"Expected an identifier and instead saw 'undefined' \(a reserved word\)"
    ],

    //Run JSLint on save.
    "run_on_save": false,

    //Debug flag.
    "debug": false
}

All available jslint_options can be found here.

License

sublime-jslint is released under the New BSD License, which may be found here.

sublime-jslint's People

Contributors

fbzhong avatar saneef avatar francescou avatar davidcalhoun avatar

Watchers

James Cloos avatar 陌上 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.