Is JSLint available for offline use?

前端 未结 17 1833
暖寄归人
暖寄归人 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-30 00:06

    Instead of downloading with a browser, you can also directly download the sources. This has the advantage that you can update them with the versioning system, and read the commented source code.

    git clone https://github.com/douglascrockford/JSLint.git
    

    This gives you HTML and JS source files, but you cannot use them as they are. Follow the build process in README. In a nutshell, you need to git clone two other JS projects of Douglas Crockford, then concatenate (and minimise) some JS files from all three git repositories into web_jslint.js.

    I did it like this, with the YUI Compressor:

    cat ../ADsafe/adsafe.js ../JSON-js/json2.js intercept.js jslint.js > /tmp/web_jslint.uncomp.js
    java -jar ../../yuicompressor-2.4.7.jar /tmp/web_jslint.uncomp.js > web_jslint.js
    

    Then open jslint.html with your browser.

提交回复
热议问题