JSLint with multiple files

后端 未结 7 567
旧巷少年郎
旧巷少年郎 2020-12-11 14:22

JSLint works fine for just one JavaScript file. Recently, I\'ve started breaking my program into several pieces.

I don\'t want to be stringing the pieces each time I

7条回答
  •  没有蜡笔的小新
    2020-12-11 15:11

    (This Is taken from this link and formatted)

    Rhino is a Javascript engine that is written entirely in Java. It can be used to run JSLint from the command line on systems with Java interpreters.

    The file jslint.js can be run by Rhino. It will read a JavaScript program from a file. If there are no problems, it terminates quietly. If there is a problem, it outputs a message. The WSH edition of JSLint does not produce a Function Report.

    One way to run JSLint is with this command:

    C:\> java org.mozilla.javascript.tools.shell.Main jslint.js myprogram.js
    

    It runs java which loads and runs Rhino which loads and runs jslint.js, which will read the file myprogram.js and report an error if found.

    Download jslint.js.

提交回复
热议问题