modules/ve-mw/preinit/ve.init.mw.ArticleTargetLoader.js
Function requestParsoidData
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
requestParsoidData: function ( pageName, options, noRestbase, noMetadata ) {
const section = options.section !== undefined ? options.section : null,
useRestbase = !noRestbase && ( conf.fullRestbaseUrl || conf.restbaseUrl ) && section === null;
options = options || {};
File ve.init.mw.ArticleTargetLoader.js
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* VisualEditor MediaWiki ArticleTargetLoader.
*
* @copyright See AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
Function createCheckboxFields
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createCheckboxFields: function ( checkboxesDef, widgetConfig ) {
const checkboxFields = [],
checkboxesByName = {};
if ( checkboxesDef ) {
Function requestPageData
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
requestPageData: function ( mode, pageName, options ) {
options = options || {};
const apiRequest = mode === 'source' ?
this.requestWikitext.bind( this, pageName, options ) :
this.requestParsoidData.bind( this, pageName, options );
Avoid deeply nested control flow statements. Open
Open
if ( confirmed ) {
return dataPromise;
} else {
// If they requested the latest version, invalidate the autosave state
mw.storage.session.remove( 've-docstate' );