chore(cloudcmd) lint

This commit is contained in:
coderaiser 2022-02-19 15:37:28 +02:00
parent 69c8eecaf1
commit 3ba6d4ae53
7 changed files with 10 additions and 20 deletions

View file

@ -9,7 +9,6 @@ jobs:
strategy:
matrix:
node-version:
- 14.x
- 16.x
- 17.x
steps:

View file

@ -830,7 +830,6 @@ module.exports.updateCurrentInfo = (currentFile) => {
info.isDir = DOM.isCurrentIsDir();
info.isSelected = DOM.isSelected(current);
info.panelPosition = DOM.getPanel().dataset.name.replace('js-', '');
info.isOnePanel =
info.panel.getAttribute('data-name') ===
info.isOnePanel = info.panel.getAttribute('data-name') ===
info.panelPassive.getAttribute('data-name');
};

View file

@ -228,8 +228,7 @@ function onAuthChange(checked) {
const elUsername = input.getElementByName('username', Element);
const elPassword = input.getElementByName('password', Element);
elUsername.disabled =
elPassword.disabled = !checked;
elUsername.disabled = elPassword.disabled = !checked;
}
function onNameChange(name) {

View file

@ -31,8 +31,7 @@ CloudCmd.sortPanel = (name, panel = getPanel()) => {
order[position] = 'asc';
}
sortPrevious =
sort[position] = name;
sortPrevious = sort[position] = name;
const noCurrent = position !== Info.panelPosition;

View file

@ -253,12 +253,7 @@ function getAttribute(type) {
}
module.exports._getSize = getSize;
function getSize(file) {
const {
size,
type,
} = file;
function getSize({size, type}) {
if (type === 'directory')
return '<dir>';

View file

@ -35,12 +35,12 @@ const logger = tryRequire('morgan');
module.exports = async (options, config) => {
const prefix = config('prefix');
const port = process.env.PORT || /* c9 */
config('port');
const port = process.env.PORT /* c9 */
|| config('port');
const ip = process.env.IP || /* c9 */
config('ip') ||
'0.0.0.0';
const ip = process.env.IP /* c9 */
|| config('ip')
|| '0.0.0.0';
const app = express();
const server = http.createServer(app);

View file

@ -52,8 +52,7 @@ const data = {
}],
};
let Expect =
'<div data-name="js-path" class="reduce-text" title="/etc/X11/">' +
let Expect = '<div data-name="js-path" class="reduce-text" title="/etc/X11/">' +
'<span data-name="js-copy-path" class="path-icon icon-copy-to-clipboard"' +
' title="copy path (Ctrl+P)">' +
'</span>' +