Is JSLint available for offline use?

前端 未结 17 1824
暖寄归人
暖寄归人 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:16

    It's pretty easy to recreate what Crockford has on JSLint.com. JSLint.com's online version of the .js is a minified conglomeration of a few files that includes some overhead I don't quite understand, like that ADSAFE stuff. Let's strip it down to a simplest case wrapper instead.

    Building your own HTML wrapper for JSLint:

    Here's the code to a web page that'll look for jslint.js (the latest version of JSLint can currently be found in github here as raw text) in the same directory and fire away in a similar fashion as JSLint.com does now.

    
        
            
    
            
    
        
    
        
    
            

    ^ From an old blog post of mine.

    It's up to the proverbial reader to make the GUI more gooey, but this reports as well as the JSLint site does now.

    sample JSLint output from wrapper code

提交回复
热议问题