From: Timo Tijhof Date: Tue, 3 Jul 2012 07:33:51 +0000 (+0200) Subject: jshint: add .jshintrc / .jshintignore files X-Git-Tag: 1.31.0-rc.0~23151^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=fe5fa2d0b1c74fe57423e6b597bb59e28a25b12b;p=lhc%2Fweb%2Fwiklou.git jshint: add .jshintrc / .jshintignore files * More commits to follow that further fine-tune the settings and fix lint errors in the actual files. * Quick how-to on how to use jshint from the command-line interface: - Prerequisites: node and npm http://nodejs.org/ http://npmjs.org/ - `$ npm install -g jshint` https://github.com/jshint/node-jshint/ - Done! All: `/mediawiki/core$ jshint .` Dir: `/mediawiki/core$ jshint resources` Dir: `/mediawiki/core$ jshint resources/jquery` File(s): `/mediawiki/core$ jshint resources/startup.js resources/mediawiki/mediawiki.js` Change-Id: Ia9297cb72c8faa7543ccfbdf48c7ee4e8af4ae17 --- diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000000..fb2a42f1fd --- /dev/null +++ b/.jshintignore @@ -0,0 +1,20 @@ +# upstream libs +resources/jquery/jquery.appear.js +resources/jquery/jquery.async.js +resources/jquery/jquery.cycle.all.js +resources/jquery/jquery.cookie.js +resources/jquery/jquery.farbtastic.js +resources/jquery/jquery.form.js +resources/jquery/jquery.js +resources/jquery/jquery.json.js +resources/jquery/jquery.mockjax.js +resources/jquery/jquery.qunit.js +resources/jquery/jquery.validate.js +resources/jquery/jquery.xmldom.js +resources/jquery.effects +resources/jquery.ui +tests/jasmine/lib/jasmine-1.0.1/jasmine-html.js +tests/jasmine/lib/jasmine-1.0.1/jasmine.js + +# legacy stuff +skins/common diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000000..4e821555ef --- /dev/null +++ b/.jshintrc @@ -0,0 +1,10 @@ +{ + "predef": [ + "mediaWiki", + "jQuery", + "QUnit" + ], + "browser": true, + "smarttabs": true, + "laxbreak": true +}