eslint: enforce use of const when variable not modified

This commit is contained in:
JFH
2021-05-31 00:09:51 +02:00
parent a4ef206050
commit 074df9cdec
16 changed files with 27 additions and 21 deletions

View File

@@ -21,7 +21,7 @@ export function isObject(item) {
}
export function mergeDeep(target, source) {
let output = Object.assign({}, target);
const output = Object.assign({}, target);
if (isObject(target) && isObject(source)) {
Object.keys(source).forEach((key) => {
if (isObject(source[key])) {
@@ -146,7 +146,7 @@ export function getParents(elem, selector) {
}
export function getParentsUntil(elem, parent, selector) {
let parents = [];
const parents = [];
let parentType;
let selectorType;
if ( parent ) {

View File

@@ -1652,7 +1652,7 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc
let iconColor = null; // iconColor for popup icon
let iconAlpha = null; // iconAlpha for popup icon
let iconImage = null; // iconImage popup icon
let moveBar = null; // drag bar
const moveBar = null; // drag bar
Object.assign(that, {
// public properties, methods, and callbacks
commitCallback, // commitCallback function can be overridden to return the selected color to a method you specify when the user clicks "OK"