build: Upgrade grunt-jscs and remove legacy jshint camelcase/nomen

Follows-up 4ec6b0cce.

grunt-jscs v0.7.0 upgraded node-jscs to v0.6.0 which introduced
the ability to disable rules via inline comments.

This means we can finally remove the deprecated jshint rules for
coding style rules and restrict jshint to code quality only.

Unsuppress the equivalent rules from jscs.

Change-Id: Idacf7e552d656ee139863d927e5bfc1f86af8283
This commit is contained in:
Timo Tijhof 2014-11-18 20:44:44 +00:00 committed by Krinkle
parent 4a4ffbbf85
commit 459432f2a7
5 changed files with 5 additions and 10 deletions

View file

@ -1,10 +1,8 @@
{
"preset": "wikimedia",
"disallowDanglingUnderscores": null,
"disallowKeywordsOnNewLine": null,
"disallowQuotedKeysInObjects": null,
"requireCamelCaseOrUpperCaseIdentifiers": null,
"requireSpacesInsideArrayBrackets": null,
"validateIndentation": null
}

View file

@ -22,9 +22,5 @@
"mediaWiki": true,
"jQuery": false,
"QUnit": false
},
// Legacy (to be handled by jscs once supported)
"camelcase": true,
"nomen": true
}
}

View file

@ -5,7 +5,7 @@
* http://www.modernmethod.com/sajax/
*/
/*jshint camelcase:false */
/*jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
/*global alert */
( function ( mw ) {

View file

@ -382,10 +382,11 @@
};
img.src = dataURL;
}, mw.config.get( 'wgFileCanRotate' ) ? function ( data ) {
/*jshint camelcase:false, nomen:false */
try {
meta = mw.libs.jpegmeta( data, file.fileName );
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers, disallowDanglingUnderscores
meta._binary_data = null;
// jscs:enable
} catch ( e ) {
meta = null;
}

View file

@ -9,7 +9,7 @@
"grunt-contrib-jshint": "0.10.0",
"grunt-contrib-watch": "0.6.1",
"grunt-banana-checker": "0.2.0",
"grunt-jscs": "0.6.1",
"grunt-jscs": "0.8.1",
"grunt-jsonlint": "1.0.4"
}
}