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:
parent
4a4ffbbf85
commit
459432f2a7
5 changed files with 5 additions and 10 deletions
2
.jscsrc
2
.jscsrc
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
"preset": "wikimedia",
|
||||
|
||||
"disallowDanglingUnderscores": null,
|
||||
"disallowKeywordsOnNewLine": null,
|
||||
"disallowQuotedKeysInObjects": null,
|
||||
"requireCamelCaseOrUpperCaseIdentifiers": null,
|
||||
"requireSpacesInsideArrayBrackets": null,
|
||||
"validateIndentation": null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,5 @@
|
|||
"mediaWiki": true,
|
||||
"jQuery": false,
|
||||
"QUnit": false
|
||||
},
|
||||
|
||||
// Legacy (to be handled by jscs once supported)
|
||||
"camelcase": true,
|
||||
"nomen": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* http://www.modernmethod.com/sajax/
|
||||
*/
|
||||
|
||||
/*jshint camelcase:false */
|
||||
/*jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
|
||||
/*global alert */
|
||||
( function ( mw ) {
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue