Is JSLint available for offline use?

前端 未结 17 1721
暖寄归人
暖寄归人 2020-12-29 23:36

I\'d like to use JSLint, but I am wary of tools that have access to my unfiltered source code. Is there an offline version or is there another similar tool that does \"

相关标签:
17条回答
  • 2020-12-29 23:54

    If you use TextMate, I've made a bundle that runs JSLint and displays the output in a graphical window. It's all self-contained; nothing else needs to be installed to use it:

    View JSLint.tmbundle at GitHub

    0 讨论(0)
  • 2020-12-29 23:57

    I have JSLint with Node.js validating code in my deploy scripts to ensure I don't accidentally push code that could break my site. It can save a lot of time handling customer support issues later.

    0 讨论(0)
  • 2020-12-30 00:01

    Yes:

    • On Windows, use jslint.js + WSH.
    • On systems that can run Rhino, use jslint.js + Rhino.

    Basically, you just need an embedded JavaScript compiler to run jslint.js.

    0 讨论(0)
  • 2020-12-30 00:01

    I have a tool for running JSLint from the command line with either the SpiderMonkey shell or Rhino. It also includes a plugin for Vim that allows you to press a button to automatically highlight any problem lines while editing a file:

    http://github.com/hallettj/jslint.vim/

    0 讨论(0)
  • 2020-12-30 00:02

    JSLint can be run offline with either WSH or Rhino:

    http://www.jslint.com/lint.html#try

    Edit: In the two years since this question was asked, JSLint has dropped support for Rhino and WSH. I encourage anyone interested in linting their code to also check out JSHint. It's a fork of JSLint which aims to be more flexible than the original, but also happens to support Node, Rhino, and WSH (in addition to browsers, of course).

    0 讨论(0)
  • 2020-12-30 00:03

    If you're in a Java environment, you may find my jslint4java tool useful. It comes in a command line variant, and can also be integrated into an ant script. No GUI, because I suck badly at those. :-)

    0 讨论(0)
提交回复
热议问题