jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/352350 )
Change subject: Enable JSCS rule to enforce space in "function ()"
......................................................................
Enable JSCS rule to enforce space in "function ()"
Change-Id: Id687fdc571b51c81468e7b96fa851faa2a1ec977
---
M .jscsrc
M Gruntfile.js
M resources/datamodel/MediaInfo.js
M resources/getDeserializer.js
M resources/jquery.wikibase.mediainfoview.js
M resources/serialization/MediaInfoDeserializer.js
6 files changed, 21 insertions(+), 42 deletions(-)
Approvals:
Addshore: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.jscsrc b/.jscsrc
index 20c363d..b110fb8 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -26,26 +26,5 @@
"requireNewlineAfterDescription": true
},
- "requireVarDeclFirst": null,
-
- // No space after function
- "disallowSpaceAfterKeywords": [
- "function"
- ],
-
- "requireSpaceAfterKeywords": [
- "do",
- "for",
- "if",
- "else",
- "switch",
- "case",
- "try",
- "catch",
- "void",
- "while",
- "with",
- "return",
- "typeof"
- ]
+ "requireVarDeclFirst": null
}
diff --git a/Gruntfile.js b/Gruntfile.js
index 6396da2..ddcbbda 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,5 +1,5 @@
/*jshint node:true */
-module.exports = function( grunt ) {
+module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
diff --git a/resources/datamodel/MediaInfo.js b/resources/datamodel/MediaInfo.js
index 1a175e9..ef1f848 100644
--- a/resources/datamodel/MediaInfo.js
+++ b/resources/datamodel/MediaInfo.js
@@ -1,4 +1,4 @@
-( function( wb, util ) {
+( function ( wb, util ) {
'use strict';
var PARENT = wb.datamodel.Entity;
@@ -21,7 +21,7 @@
var SELF = wb.datamodel.MediaInfo = util.inherit(
'WbDataModelMediaInfo',
PARENT,
- function( mediaInfoId, labels, descriptions, statementGroupSet
) {
+ function ( mediaInfoId, labels, descriptions, statementGroupSet
) {
labels = labels || new wb.datamodel.TermMap();
descriptions = descriptions || new
wb.datamodel.TermMap();
statementGroupSet = statementGroupSet || new
wb.datamodel.StatementGroupSet();
@@ -50,28 +50,28 @@
/**
* @return {wikibase.datamodel.StatementGroupSet}
*/
- getStatements: function() {
+ getStatements: function () {
return this._statementGroupSet;
},
/**
* @param {wikibase.datamodel.Statement} statement
*/
- addStatement: function( statement ) {
+ addStatement: function ( statement ) {
this._statementGroupSet.addStatement( statement );
},
/**
* @param {wikibase.datamodel.Statement} statement
*/
- removeStatement: function( statement ) {
+ removeStatement: function ( statement ) {
this._statementGroupSet.removeStatement( statement );
},
/**
* @return {boolean}
*/
- isEmpty: function() {
+ isEmpty: function () {
return this._statementGroupSet.isEmpty() &&
this._fingerprint.isEmpty();
},
@@ -79,7 +79,7 @@
* @param {*} mediaInfo
* @return {boolean}
*/
- equals: function( mediaInfo ) {
+ equals: function ( mediaInfo ) {
return mediaInfo === this ||
( mediaInfo instanceof SELF &&
this._id === mediaInfo.getId() &&
diff --git a/resources/getDeserializer.js b/resources/getDeserializer.js
index d24c2ce..5b85a59 100644
--- a/resources/getDeserializer.js
+++ b/resources/getDeserializer.js
@@ -1,6 +1,6 @@
-( function( wb ) {
+( function ( wb ) {
'use strict';
- module.exports = function() {
+ module.exports = function () {
return new wb.mediainfo.serialization.MediaInfoDeserializer();
};
}( wikibase ) );
diff --git a/resources/jquery.wikibase.mediainfoview.js
b/resources/jquery.wikibase.mediainfoview.js
index 863f912..6a9c4cd 100644
--- a/resources/jquery.wikibase.mediainfoview.js
+++ b/resources/jquery.wikibase.mediainfoview.js
@@ -1,4 +1,4 @@
-( function( $ ) {
+( function ( $ ) {
'use strict';
var PARENT = $.wikibase.entityview;
@@ -34,7 +34,7 @@
* @inheritdoc
* @protected
*/
- _create: function() {
+ _create: function () {
this._createEntityview();
this.$statements = $(
'.wikibase-statementgrouplistview', this.element );
@@ -47,7 +47,7 @@
* @inheritdoc
* @protected
*/
- _init: function() {
+ _init: function () {
if ( !this.options.buildStatementGroupListView ) {
throw new Error( 'Required option(s) missing' );
}
@@ -59,7 +59,7 @@
/**
* @protected
*/
- _initStatements: function() {
+ _initStatements: function () {
this.options.buildStatementGroupListView(
this.options.value, this.$statements );
// This is here to be sure there is never a duplicate
id:
@@ -73,7 +73,7 @@
* @inheritdoc
* @protected
*/
- _attachEventHandlers: function() {
+ _attachEventHandlers: function () {
PARENT.prototype._attachEventHandlers.call( this );
var self = this;
@@ -83,7 +83,7 @@
'statementviewafterstartediting.' +
this.widgetName,
'referenceviewafterstartediting.' +
this.widgetName
].join( ' ' ),
- function() {
+ function () {
self._trigger( 'afterstartediting' );
} );
@@ -94,7 +94,7 @@
'statementviewafterremove.' + this.widgetName,
'referenceviewafterstopediting.' +
this.widgetName
].join( ' ' ),
- function( event, dropValue ) {
+ function ( event, dropValue ) {
self._trigger( 'afterstopediting', null, [
dropValue ] );
} );
},
@@ -103,7 +103,7 @@
* @inheritdoc
* @protected
*/
- _setState: function( state ) {
+ _setState: function ( state ) {
PARENT.prototype._setState.call( this, state );
this.$statements.data( 'statementgrouplistview' )[
state ]();
diff --git a/resources/serialization/MediaInfoDeserializer.js
b/resources/serialization/MediaInfoDeserializer.js
index 878b99e..5437299 100644
--- a/resources/serialization/MediaInfoDeserializer.js
+++ b/resources/serialization/MediaInfoDeserializer.js
@@ -1,4 +1,4 @@
-( function( wb, util ) {
+( function ( wb, util ) {
'use strict';
var MODULE = wb.mediainfo.serialization,
@@ -21,7 +21,7 @@
*
* @throws {Error} if serialization does not resolve to a
serialized MediaInfo.
*/
- deserialize: function( serialization ) {
+ deserialize: function ( serialization ) {
if ( serialization.type !== wb.datamodel.MediaInfo.TYPE
) {
throw new Error( 'Serialization does not
resolve to an MediaInfo' );
}
--
To view, visit https://gerrit.wikimedia.org/r/352350
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id687fdc571b51c81468e7b96fa851faa2a1ec977
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseMediaInfo
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits