From fe5fa2d0b1c74fe57423e6b597bb59e28a25b12b Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 3 Jul 2012 09:33:51 +0200 Subject: [PATCH] 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 --- .jshintignore | 20 ++++++++++++++++++++ .jshintrc | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .jshintignore create mode 100644 .jshintrc 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 +} -- 2.20.1