Require constructor names to begin with a capital letter
Turns new-cap ESLint to error Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
e03eb1b50c
commit
3e11b7e6b3
@ -14,7 +14,7 @@
|
||||
"eqeqeq": "error",
|
||||
"indent": ["error", 4],
|
||||
"keyword-spacing": "error",
|
||||
"new-cap": "warn",
|
||||
"new-cap": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-eval": "error",
|
||||
"no-loop-func": "error",
|
||||
|
||||
2
js/codemirror/addon/lint/sql-lint.js
vendored
2
js/codemirror/addon/lint/sql-lint.js
vendored
@ -9,9 +9,11 @@ CodeMirror.sqlLint = function (text, updateLinting, options, cm) {
|
||||
var found = [];
|
||||
for (var idx in response) {
|
||||
found.push({
|
||||
// eslint-disable-next-line new-cap
|
||||
from: CodeMirror.Pos(
|
||||
response[idx].fromLine, response[idx].fromColumn
|
||||
),
|
||||
// eslint-disable-next-line new-cap
|
||||
to: CodeMirror.Pos(
|
||||
response[idx].toLine, response[idx].toColumn
|
||||
),
|
||||
|
||||
@ -322,8 +322,6 @@ var Console = {
|
||||
case 'show':
|
||||
Console.collapse();
|
||||
break;
|
||||
default:
|
||||
ConsoleInitialize();
|
||||
}
|
||||
},
|
||||
/**
|
||||
@ -521,6 +519,7 @@ var ConsoleInput = {
|
||||
}
|
||||
ConsoleInput._inputs = [];
|
||||
if (ConsoleInput._codemirror) {
|
||||
// eslint-disable-next-line new-cap
|
||||
ConsoleInput._inputs.console = CodeMirror($('#pma_console').find('.console_query_input')[0], {
|
||||
theme: 'pma',
|
||||
mode: 'text/x-sql',
|
||||
@ -538,6 +537,7 @@ var ConsoleInput = {
|
||||
ConsoleInput._historyNavigate(event);
|
||||
});
|
||||
if ($('#pma_bookmarks').length !== 0) {
|
||||
// eslint-disable-next-line new-cap
|
||||
ConsoleInput._inputs.bookmark = CodeMirror($('#pma_console').find('.bookmark_add_input')[0], {
|
||||
theme: 'pma',
|
||||
mode: 'text/x-sql',
|
||||
|
||||
@ -445,34 +445,34 @@ $(function () {
|
||||
/** Create a Routine, Trigger or Event */
|
||||
$(document).on('click', 'li.new_procedure a.ajax, li.new_function a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('routine');
|
||||
var dialog = new RTE.Object('routine');
|
||||
dialog.editorDialog(1, $(this));
|
||||
});
|
||||
$(document).on('click', 'li.new_trigger a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('trigger');
|
||||
var dialog = new RTE.Object('trigger');
|
||||
dialog.editorDialog(1, $(this));
|
||||
});
|
||||
$(document).on('click', 'li.new_event a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('event');
|
||||
var dialog = new RTE.Object('event');
|
||||
dialog.editorDialog(1, $(this));
|
||||
});
|
||||
|
||||
/** Edit Routines, Triggers or Events */
|
||||
$(document).on('click', 'li.procedure > a.ajax, li.function > a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('routine');
|
||||
var dialog = new RTE.Object('routine');
|
||||
dialog.editorDialog(0, $(this));
|
||||
});
|
||||
$(document).on('click', 'li.trigger > a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('trigger');
|
||||
var dialog = new RTE.Object('trigger');
|
||||
dialog.editorDialog(0, $(this));
|
||||
});
|
||||
$(document).on('click', 'li.event > a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('event');
|
||||
var dialog = new RTE.Object('event');
|
||||
dialog.editorDialog(0, $(this));
|
||||
});
|
||||
|
||||
@ -480,14 +480,14 @@ $(function () {
|
||||
$(document).on('click', 'li.procedure div a.ajax img,' +
|
||||
' li.function div a.ajax img', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('routine');
|
||||
var dialog = new RTE.Object('routine');
|
||||
dialog.executeDialog($(this).parent());
|
||||
});
|
||||
/** Export Triggers and Events */
|
||||
$(document).on('click', 'li.trigger div:eq(1) a.ajax img,' +
|
||||
' li.event div:eq(1) a.ajax img', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object();
|
||||
var dialog = new RTE.Object();
|
||||
dialog.exportDialog($(this).parent());
|
||||
});
|
||||
|
||||
|
||||
20
js/rte.js
20
js/rte.js
@ -13,7 +13,7 @@ var RTE = {
|
||||
* Construct for the object that provides the
|
||||
* functionality for Routines, Triggers and Events
|
||||
*/
|
||||
object: function (type) {
|
||||
Object: function (type) {
|
||||
$.extend(this, RTE.COMMON);
|
||||
this.editorType = type;
|
||||
|
||||
@ -931,7 +931,7 @@ $(function () {
|
||||
} else {
|
||||
type = '';
|
||||
}
|
||||
var dialog = new RTE.object(type);
|
||||
var dialog = new RTE.Object(type);
|
||||
dialog.editorDialog($(this).hasClass('add_anchor'), $(this));
|
||||
}); // end $(document).on()
|
||||
|
||||
@ -940,7 +940,7 @@ $(function () {
|
||||
*/
|
||||
$(document).on('click', 'a.ajax.exec_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('routine');
|
||||
var dialog = new RTE.Object('routine');
|
||||
dialog.executeDialog($(this));
|
||||
}); // end $(document).on()
|
||||
|
||||
@ -949,13 +949,13 @@ $(function () {
|
||||
*/
|
||||
$(document).on('click', 'a.ajax.export_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object();
|
||||
var dialog = new RTE.Object();
|
||||
dialog.exportDialog($(this));
|
||||
}); // end $(document).on()
|
||||
|
||||
$(document).on('click', '#rteListForm.ajax .mult_submit[value="export"]', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object();
|
||||
var dialog = new RTE.Object();
|
||||
dialog.exportDialog($(this));
|
||||
}); // end $(document).on()
|
||||
|
||||
@ -965,13 +965,13 @@ $(function () {
|
||||
*/
|
||||
$(document).on('click', 'a.ajax.drop_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object();
|
||||
var dialog = new RTE.Object();
|
||||
dialog.dropDialog($(this));
|
||||
}); // end $(document).on()
|
||||
|
||||
$(document).on('click', '#rteListForm.ajax .mult_submit[value="drop"]', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object();
|
||||
var dialog = new RTE.Object();
|
||||
dialog.dropMultipleDialog($(this));
|
||||
}); // end $(document).on()
|
||||
|
||||
@ -999,7 +999,7 @@ $(function () {
|
||||
* a row in the routine parameters table
|
||||
*/
|
||||
var $row = $(this).parents('tr').first();
|
||||
var rte = new RTE.object('routine');
|
||||
var rte = new RTE.Object('routine');
|
||||
rte.setOptionsForParameter(
|
||||
$row.find('select[name^=item_param_type]'),
|
||||
$row.find('input[name^=item_param_length]'),
|
||||
@ -1014,7 +1014,7 @@ $(function () {
|
||||
* if any, are shown when changing the function return type type
|
||||
*/
|
||||
$(document).on('change', 'select[name=item_returntype]', function () {
|
||||
var rte = new RTE.object('routine');
|
||||
var rte = new RTE.Object('routine');
|
||||
var $table = $(this).closest('table.rte_table');
|
||||
rte.setOptionsForParameter(
|
||||
$table.find('select[name=item_returntype]'),
|
||||
@ -1052,7 +1052,7 @@ $(function () {
|
||||
*/
|
||||
var $newrow = $(this).closest('div.ui-dialog').find('table.routine_params_table').find('tr').has('td').last();
|
||||
// Enable/disable the 'options' dropdowns for parameters as necessary
|
||||
var rte = new RTE.object('routine');
|
||||
var rte = new RTE.Object('routine');
|
||||
rte.setOptionsForParameter(
|
||||
$newrow.find('select[name^=item_param_type]'),
|
||||
$newrow.find('input[name^=item_param_length]'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user