Skip to content

Commit

Permalink
morebits: create capitalized aliases for classes (#2086)
Browse files Browse the repository at this point in the history
related #2084

next patch will be switching to these capitalized aliases in other files, which will fix new-caps ESLint warnings
  • Loading branch information
NovemLinguae authored Nov 27, 2024
1 parent 9c55904 commit d57392e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions morebits.js
Original file line number Diff line number Diff line change
Expand Up @@ -6079,6 +6079,21 @@ Morebits.simpleWindow.setButtonsEnabled = function(enabled) {
$('.morebits-dialog-buttons button').prop('disabled', !enabled);
};

// Create capital letter aliases for all Morebits @classes (functions that work with the `new` keyword), to follow the coding convention that classes should start with an uppercase letter. This will let us start fixing ESLint `new-cap` errors in other files.
Morebits.BatchOperation = Morebits.batchOperation;
Morebits.Date = Morebits.date;
Morebits.QuickForm = Morebits.quickForm;
Morebits.QuickForm.Element = Morebits.quickForm.element;
Morebits.SimpleWindow = Morebits.simpleWindow;
Morebits.Status = Morebits.status;
Morebits.TaskManager = Morebits.taskManager;
Morebits.Unbinder = Morebits.unbinder;
Morebits.UserspaceLogger = Morebits.userspaceLogger;
Morebits.wiki.Api = Morebits.wiki.api;
Morebits.wiki.Page = Morebits.wiki.page;
Morebits.wiki.Preview = Morebits.wiki.preview;
Morebits.wikitext.Page = Morebits.wikitext.page;

}());

/**
Expand Down

0 comments on commit d57392e

Please sign in to comment.