jshint: add .jshintrc / .jshintignore files
authorTimo Tijhof <ttijhof@wikimedia.org>
Tue, 3 Jul 2012 07:33:51 +0000 (09:33 +0200)
committerTimo Tijhof <ttijhof@wikimedia.org>
Tue, 3 Jul 2012 15:26:59 +0000 (17:26 +0200)
* 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

.jshintignore [new file with mode: 0644]
.jshintrc [new file with mode: 0644]

diff --git a/.jshintignore b/.jshintignore
new file mode 100644 (file)
index 0000000..fb2a42f
--- /dev/null
@@ -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 (file)
index 0000000..4e82155
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,10 @@
+{
+       "predef": [
+               "mediaWiki",
+               "jQuery",
+               "QUnit"
+       ],
+       "browser": true,
+       "smarttabs": true,
+       "laxbreak": true
+}