Skip to content

Commit

Permalink
fix more linter warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
lebrinkma committed Sep 5, 2024
1 parent 3b672b5 commit 76d39ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
13 changes: 6 additions & 7 deletions admin/adapter-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const parts = path.split('/');
parts.splice(-3);

const socket = io.connect('/', { path: parts.join('/') + '/socket.io' });
var query = (window.location.search || '').replace(/^\?/, '').replace(/#.*$/, '');
var args = {};
const query = (window.location.search || '').replace(/^\?/, '').replace(/#.*$/, '');
const args = {};
let theme = null;

// parse parameters
Expand All @@ -14,7 +14,7 @@ query.trim().split('&').filter(function (t) { return t.trim(); }).forEach(functi
if (!i && parts.length === 1 && !isNaN(parseInt(b, 10))) {
args.instance = parseInt(b, 10);
}
var name = parts[0];
const name = parts[0];
args[name] = parts.length === 2 ? parts[1] : true;

if (name === 'instance') {
Expand All @@ -28,7 +28,7 @@ query.trim().split('&').filter(function (t) { return t.trim(); }).forEach(functi
}
});

var instance = args.instance;
const instance = args.instance;

let common = null; // common information of adapter
const host = null; // host object on which the adapter runs
Expand Down Expand Up @@ -97,7 +97,7 @@ function loadSettings(callback) {
alert('Please implement save function in your admin/index.html');
} else {
const _query = query.split('&');
for (var q = 0; q < _query.length; q++) {
for (let q = 0; q < _query.length; q++) {
if (_query[q].indexOf('react=') !== -1) {
$('.adapter-container').addClass('react-' + _query[q].substring(6));
theme = 'react-' + _query[q].substring(6);
Expand Down Expand Up @@ -207,9 +207,8 @@ function onChange(isChanged) {
}

function showMessage(message, title, icon) {
var $dialogMessage;
// noinspection JSJQueryEfficiency
$dialogMessage = $('#dialog-message');
let $dialogMessage = $('#dialog-message');
if (!$dialogMessage.length) {
$('body').append(
'<div class="m"><div id="dialog-message" class="modal modal-fixed-footer">' +
Expand Down
4 changes: 2 additions & 2 deletions admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let devices = [],
networkEvents,
responseCodes = false,
groups = {},
devGroups = {},
devGroups = {}, // eslint-disable-line prefer-const
binding = [],
excludes = [],
coordinatorinfo = {
Expand Down Expand Up @@ -433,7 +433,7 @@ function editName(id, name) {
}

function GenerateGroupChange(oldmembers, newmembers) {
let grpchng = [];
const grpchng = [];
for (const oldg of oldmembers)
if (!newmembers.includes(oldg)) grpchng.push('-' + oldg);
for (const newg of newmembers)
Expand Down
1 change: 0 additions & 1 deletion lib/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class Backup {
}
}

// eslint-disable-next-line no-unused-vars
delBackupsFiles(options, files) {
const arr = files.length;
if (arr > 10) {
Expand Down

0 comments on commit 76d39ae

Please sign in to comment.