Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can JsLint be integrated into xCode?

I'm editing some Javascript files using XCode's editor (I know, you want to ask me why, but bear with me here), and I'd like to have lint run on my edits, regularly.

I don't have a real preference - it might be every time the file saves, or on each edit, or, worst case scenario, automatically when I hit the build or run button.

Can a setup along these lines be put together? Any pointers?

like image 659
blueberryfields Avatar asked Apr 01 '26 17:04

blueberryfields


1 Answers

You could use the jslint command line utility (installed as a ruby gem) and add a pre-action to your build scheme. You already have ruby and rubygems installed on Mac OS X, so just

(sudo) gem install jslint

Then create a pre-action to run

jslint path/to/javascript/file.js

Source code for the jslint rubygem

like image 87
jacobsimeon Avatar answered Apr 04 '26 05:04

jacobsimeon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!