Fixed code smell 'Unexpected empty arrow function' reported by SonarQube.

This commit is contained in:
Akshay Joshi
2022-01-12 18:59:21 +05:30
parent 4e414f57e6
commit 3f7e921cce
18 changed files with 41 additions and 41 deletions

View File

@@ -100,7 +100,7 @@ define([
};
/* Returns raw data as it is */
var RawFormatter = Backform.RawFormatter = function() {};
var RawFormatter = Backform.RawFormatter = function() {/*This is intentional (SonarQube)*/};
_.extend(RawFormatter.prototype, {
fromRaw: function(rawData) {
return rawData;
@@ -2204,7 +2204,7 @@ define([
return fields;
};
var Select2Formatter = function() {};
var Select2Formatter = function() {/*This is intentional (SonarQube)*/};
_.extend(Select2Formatter.prototype, {
fromRaw: function(rawData) {
return encodeURIComponent(rawData);
@@ -2492,7 +2492,7 @@ define([
}
return this;
},
formatter: function() {},
formatter: function() {/*This is intentional (SonarQube)*/},
cleanup: function() {
Backform.Fieldset.prototype.cleanup.apply(this);
},
@@ -3352,7 +3352,7 @@ define([
},
});
var KeyCodeControlFormatter = Backform.KeyCodeControlFormatter = function() {};
var KeyCodeControlFormatter = Backform.KeyCodeControlFormatter = function() {/*This is intentional (SonarQube)*/};
_.extend(KeyCodeControlFormatter.prototype, {
fromRaw: function (rawData) {

View File

@@ -1340,7 +1340,7 @@ define([
* displayed in the cell.
*/
var InputStringArrayCellFormatter = Backgrid.Extension.InputStringArrayCellFormatter =
function() {};
function() {/*This is intentional (SonarQube)*/};
_.extend(InputStringArrayCellFormatter.prototype, {
/**
* Takes a raw value from a model and returns an optionally formatted
@@ -1368,7 +1368,7 @@ define([
* displayed in the cell.
*/
var InputIntegerArrayCellFormatter = Backgrid.Extension.InputIntegerArrayCellFormatter =
function() {};
function() {/*This is intentional (SonarQube)*/};
_.extend(InputIntegerArrayCellFormatter.prototype, {
/**
* Takes a raw value from a model and returns an optionally formatted
@@ -1402,7 +1402,7 @@ define([
* displayed in the cell.
*/
var InputNumberArrayCellFormatter= Backgrid.Extension.InputNumberArrayCellFormatter =
function() {};
function() {/*This is intentional (SonarQube)*/};
_.extend(InputNumberArrayCellFormatter.prototype, {
/**
* Takes a raw value from a model and returns an optionally formatted
@@ -1542,7 +1542,7 @@ define([
*
* @class Backgrid.Extension.DependentCell
**/
var DependentCell = Backgrid.Extension.DependentCell = function() {};
var DependentCell = Backgrid.Extension.DependentCell = function() {/*This is intentional (SonarQube)*/};
_.extend(
DependentCell.prototype, {
@@ -1582,7 +1582,7 @@ define([
@extends Backgrid.CellFormatter
@constructor
*/
var PasswordFormatter = Backgrid.PasswordFormatter = function() {};
var PasswordFormatter = Backgrid.PasswordFormatter = function() {/*This is intentional (SonarQube)*/};
PasswordFormatter.prototype = new Backgrid.CellFormatter();
_.extend(PasswordFormatter.prototype, {
fromRaw: function(rawValue) {
@@ -1639,7 +1639,7 @@ define([
* JSONBCell Formatter.
*/
var JSONBCellFormatter = Backgrid.Extension.JSONBCellFormatter =
function() {};
function() {/*This is intentional (SonarQube)*/};
_.extend(JSONBCellFormatter.prototype, {
fromRaw: function(rawData) {
// json data
@@ -2104,7 +2104,7 @@ define([
},
});
var BooleanCellFormatter = Backgrid.BooleanCellFormatter = function() {};
var BooleanCellFormatter = Backgrid.BooleanCellFormatter = function() {/*This is intentional (SonarQube)*/};
_.extend(BooleanCellFormatter.prototype, {
fromRaw: function (rawValue) {
if (_.isUndefined(rawValue) || _.isNull(rawValue)) {

View File

@@ -131,7 +131,7 @@
@class Backform.ControlFormatter
@constructor
*/
var ControlFormatter = Backform.ControlFormatter = function() {};
var ControlFormatter = Backform.ControlFormatter = function() {/*This is intentional (SonarQube)*/};
_.extend(ControlFormatter.prototype, {
/**
@@ -167,7 +167,7 @@
});
// Store value in DOM as stringified JSON.
var JSONFormatter = Backform.JSONFormatter = function() {};
var JSONFormatter = Backform.JSONFormatter = function() {/*This is intentional (SonarQube)*/};
_.extend(JSONFormatter.prototype, {
fromRaw: function(rawData, model) {
return JSON.stringify(rawData);

View File

@@ -1975,7 +1975,7 @@ var requirejs, require, define;
// Post a task to the event loop to work around a bug in WebKit
// where the worker gets garbage-collected after calling
// importScripts(): https://webkit.org/b/153317
setTimeout(function() {}, 0);
setTimeout(function() {/*This is intentional (SonarQube)*/}, 0);
importScripts(url);
//Account for anonymous modules