简体   繁体   中英

Using JSLint in Java/GWT

I'm currently working on a project in Java, that will allow users to type Javascript code into a GWT Widget. How would I go about importing/using JSLint to check for errors? I looked around and found LSLint4Java, but I couldn't find the way to import it into eclipse. I just need a simple JS error checker that will check a string for errors.

If anyone has any other suggestions for error checking, please share them! Thanks.

The JSlint javascript source can be found here . You could include the javascript in your WAR, reference it with a script link in your page(s), and make JSNI calls from/to your GWT code.

Note that JSLint has a No Evil clause in it's license:

// The Software shall be used for Good, not Evil.

Here's a good start on JSNI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM