Update jscs and jshint config
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 16 May 2014 14:07:41 +0000 (16:07 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 16 May 2014 14:07:41 +0000 (16:07 +0200)
commitdf8c4551dcba95218cf6021dc1f3542f1095b56f
tree6dff8aa444cbaf2fc4568eb5b6ebf6033fb49181
parent20c2b9e4cee296fa1caa1cdcae37d6e883067519
Update jscs and jshint config

Continue specifying our coding style more accurately in jscs,
and phase out more deprecated jshint coding style options.

jshint:
* Update to grunt-contrib-jshint v0.10.0 (jshint v2.5.0).
* Remove coding style option "curly" (already covered by jscs).
* Remove coding style option "smarttabs" (already covered by jscs).
* Remove option "regexp".
* Enable new option "freeze" (prohibits changing native prototypes).
  http://www.jshint.com/blog/new-in-jshint-oct-2013/#option-freeze
* Re-order to match http://www.jshint.com/docs/options/

jscs:
* Update to grunt-contrib-jshint v0.4.4 (jscs v1.4.5).
* Format .jscsrc file in a more spacious way and order the
  properties less arbitrarily (using the jscs's readme order).
* Improve rule "requireCurlyBraces": Add more keywords that
    should have their code block wrapped in curly braces.
* Improve rule "requireMultipleVarDecl": Use onevar instead of true.
* Remove rules for "sticky operators", these rules are buggy
    and have been deprecated. Using the SpaceBefore/After rules
    for Unary and Binary operators instead.
* Enable rule "disallowYodaConditions".

Change-Id: I6f385e8860e91d9ef4d1f5abecf517d36af45565
17 files changed:
.jscsrc
.jshintrc
resources/src/jquery/jquery.highlightText.js
resources/src/jquery/jquery.placeholder.js
resources/src/jquery/jquery.qunit.completenessTest.js
resources/src/jquery/jquery.suggestions.js
resources/src/jquery/jquery.tablesorter.js
resources/src/mediawiki.special/mediawiki.special.preferences.js
resources/src/mediawiki/mediawiki.debug.profile.js
resources/src/mediawiki/mediawiki.jqueryMsg.js
resources/src/mediawiki/mediawiki.js
resources/src/mediawiki/mediawiki.util.js
skins/common/ajax.js
tests/frontend/package.json
tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js