Skip to content

Commit 3832f7d

Browse files
committed
chore: lint
1 parent 7f0617b commit 3832f7d

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

bin/cloudcmd.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import env from '../server/env.js';
1212
import prefixer from '../server/prefixer.js';
1313
import * as validate from '../server/validate.mjs';
1414

15+
const isUndefined = (a) => typeof a === 'undefined';
16+
1517
process.on('unhandledRejection', exit);
1618

1719
const require = createRequire(import.meta.url);
@@ -21,7 +23,7 @@ const Info = require('../package.json');
2123
const simport = createSimport(import.meta.url);
2224

2325
const choose = (a, b) => {
24-
if (a === undefined)
26+
if (isUndefined(a))
2527
return b;
2628

2729
return a;

common/cloudfunc.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,12 @@ module.exports.buildFromJSON = (params) => {
248248
return fileTable;
249249
};
250250

251-
function updateField(file) {
252-
return {
253-
...file,
254-
date: file.date || '--.--.----',
255-
owner: file.owner || 'root',
256-
size: getSize(file),
257-
};
258-
}
251+
const updateField = (file) => ({
252+
...file,
253+
date: file.date || '--.--.----',
254+
owner: file.owner || 'root',
255+
size: getSize(file),
256+
});
259257

260258
function getAttribute(type) {
261259
if (type === 'directory')

css/supports.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@supports (overflow: overlay) {
22
.files {
3-
overflow-y: overlay;
3+
overflow-y: auto;
44
}
55

66
.fm-header {

static/user-menu.spec.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,9 @@ function getDOM() {
337337
};
338338
}
339339

340-
function getCloudCmd() {
341-
return {
342-
refresh: stub(),
343-
EditFile: {
344-
show: stub(),
345-
},
346-
};
347-
}
340+
const getCloudCmd = () => ({
341+
refresh: stub(),
342+
EditFile: {
343+
show: stub(),
344+
},
345+
});

0 commit comments

Comments
 (0)