I am currently developing a wicket application where in development mode I am in the need to validate the Javascript code that is insert into the rendered output.
I know there are some Java wrappers around for wrapping JSLint (e.g.: JSLint Maven Plugin, wro4j). My problem is, that I also need to validate the JS that is added to buttons and links within the rendered markup, e.g.: <a href="#" onclick="xxx"></a>
Edit: I want do this in the build process.
Avoid logic in JavaScript in inline attributes, like onclick=”if (condition) {…} else {…}”. Better move this logic in a function in .js file and just call it : onclick=”doSomething()”.
This way you can use any linter tool at build time.