workspace: update eslint config

This commit is contained in:
undefined committed 2021-02-01 12:33:48 +08:00
1 parent 4e4f6688bc
commit 3a3983d38d
29 files changed
+169 -166

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ async function _download(url: string, path: string, retry: number) {
return path;
}
function download(url: string): SuperAgentRequest
function download(url: string): SuperAgentRequest;
function download(url: string, path?: string, retry = 3) {
if (path) return _download(url, path, retry);
return superagent.get(url).retry(retry);
+6 -6
View File
@@ -18,11 +18,11 @@ export async function get() {
const cpu = `${Cpu.manufacturer} ${Cpu.brand}`;
const memory = `${size(Memory.active)}/${size(Memory.total)}`;
const osinfo = `${OsInfo.distro} ${OsInfo.release} ${OsInfo.codename} ${OsInfo.kernel} ${OsInfo.arch}`;
const load = `${CurrentLoad.avgload}`;
const load = `${CurrentLoad.avgLoad}`;
const flags = CpuFlags;
let battery;
if (!Battery.hasbattery) battery = 'No battery';
else battery = `${Battery.type} ${Battery.model} ${Battery.percent}%${Battery.ischarging ? ' Charging' : ''}`;
if (!Battery.hasBattery) battery = 'No battery';
else battery = `${Battery.type} ${Battery.model} ${Battery.percent}%${Battery.isCharging ? ' Charging' : ''}`;
const mid = OsInfo.serial;
cache.cpu = cpu;
cache.osinfo = osinfo;
@@ -44,10 +44,10 @@ export async function update(): Promise<[string, any, any]> {
mid, cpu, osinfo, flags,
} = cache;
const memory = `${size(Memory.active)}/${size(Memory.total)}`;
const load = `${CurrentLoad.avgload}`;
const load = `${CurrentLoad.avgLoad}`;
let battery;
if (!Battery.hasbattery) battery = 'No battery';
else battery = `${Battery.type} ${Battery.model} ${Battery.percent}%${Battery.ischarging ? ' Charging' : ''}`;
if (!Battery.hasBattery) battery = 'No battery';
else battery = `${Battery.type} ${Battery.model} ${Battery.percent}%${Battery.isCharging ? ' Charging' : ''}`;
return [
mid,
{