mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
Update eslint-config-wikimedia to 0.9.0
Change-Id: I7883af1f56c7f2f3eeff1f7a51b640a303bcab78
This commit is contained in:
parent
8991801975
commit
fdde5b71af
|
@ -1,11 +1,10 @@
|
|||
{
|
||||
"extends": "wikimedia",
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"extends": [
|
||||
"wikimedia/client",
|
||||
"wikimedia/jquery"
|
||||
],
|
||||
"globals": {
|
||||
"mw": false,
|
||||
"$": false
|
||||
"mw": false
|
||||
},
|
||||
"rules": {
|
||||
"dot-notation": [ "error", { "allowKeywords": true } ],
|
||||
|
|
|
@ -146,16 +146,19 @@ ve.ui.MWCitationDialog.prototype.onAddParameterBeforeLoad = function ( page ) {
|
|||
* @return {boolean}
|
||||
*/
|
||||
ve.ui.MWCitationDialog.prototype.hasUsefulParameter = function () {
|
||||
var foundUseful = false;
|
||||
$.each( this.bookletLayout.pages, function () {
|
||||
var name, page,
|
||||
foundUseful = false;
|
||||
|
||||
for ( name in this.bookletLayout.pages ) {
|
||||
page = this.bookletLayout.pages[ name ];
|
||||
if (
|
||||
this instanceof ve.ui.MWParameterPage &&
|
||||
( !this.preLoad || this.valueInput.getValue() !== '' )
|
||||
page instanceof ve.ui.MWParameterPage &&
|
||||
( !page.preLoad || page.valueInput.getValue() !== '' )
|
||||
) {
|
||||
foundUseful = true;
|
||||
return false;
|
||||
}
|
||||
} );
|
||||
}
|
||||
return foundUseful;
|
||||
};
|
||||
|
||||
|
|
|
@ -44,17 +44,20 @@ ve.ui.MWReferenceGroupInputWidget.prototype.populateMenu = function ( internalLi
|
|||
flags: 'emptyGroupPlaceholder'
|
||||
} );
|
||||
this.menu.clearItems();
|
||||
this.menu.addItems( [ placeholderGroupItem ].concat( $.map(
|
||||
Object.keys( internalList.getNodeGroups() ),
|
||||
function ( groupInternalName ) {
|
||||
var groupName;
|
||||
if ( groupInternalName.indexOf( 'mwReference/' ) === 0 ) {
|
||||
groupName = groupInternalName.slice( 'mwReference/'.length );
|
||||
if ( groupName ) {
|
||||
return new OO.ui.MenuOptionWidget( { data: groupName, label: groupName } );
|
||||
this.menu.addItems( [ placeholderGroupItem ].concat(
|
||||
Object.keys( internalList.getNodeGroups() ).map(
|
||||
function ( groupInternalName ) {
|
||||
var groupName;
|
||||
if ( groupInternalName.indexOf( 'mwReference/' ) === 0 ) {
|
||||
groupName = groupInternalName.slice( 'mwReference/'.length );
|
||||
if ( groupName ) {
|
||||
return new OO.ui.MenuOptionWidget( { data: groupName, label: groupName } );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
) ), 0 );
|
||||
).filter( function ( item ) {
|
||||
return item;
|
||||
} )
|
||||
), 0 );
|
||||
this.menu.toggle( false );
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
"selenium-test": "wdio tests/selenium/wdio.conf.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.8.1",
|
||||
"eslint-plugin-qunit": "3.3.1",
|
||||
"eslint-config-wikimedia": "0.9.0",
|
||||
"grunt": "1.0.3",
|
||||
"grunt-banana-checker": "0.6.0",
|
||||
"grunt-eslint": "21.0.0",
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{
|
||||
"extends": "wikimedia",
|
||||
"env": {
|
||||
"es6": true,
|
||||
"mocha": true,
|
||||
"node": true
|
||||
},
|
||||
"globals": {
|
||||
"browser": false
|
||||
},
|
||||
"rules": {
|
||||
"no-console": 0
|
||||
}
|
||||
"root": true,
|
||||
"extends": [
|
||||
"wikimedia/server"
|
||||
],
|
||||
"env": {
|
||||
"mocha": true
|
||||
},
|
||||
"globals": {
|
||||
"browser": false
|
||||
},
|
||||
"rules": {
|
||||
"no-console": 0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue