Skip to content

Commit

Permalink
fix TS2322 and update @typescript-eslint/* (#479)
Browse files Browse the repository at this point in the history
* feat: add branch 'master'

* chore: remove lock file

* fix(ts): error TS2322

Type 'string | void | Buffer' is not assignable to type 'string'.

Type 'void' is not assignable to type 'string'.

* chore(deps-dev): update typescript-eslint/*

- @typescript-eslint/[email protected]
- @typescript-eslint/[email protected]

* chore: restore lock file from hexojs/hexo-cli

* chore(deps): reinstall using `npm@8`

---------

Co-authored-by: yoshinorin <[email protected]>
  • Loading branch information
dimaslanjaka and yoshinorin authored May 7, 2023
1 parent 40cdf2a commit ee1535a
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 412 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "assets"]
path = assets
url = https:/hexojs/hexo-starter.git
branch = master
6 changes: 3 additions & 3 deletions lib/console/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ async function versionConsole() {

console.log('hexo-cli:', pkg.version);

let osInfo = '';
let osInfo: string | void | Buffer;
if (platform === 'darwin') osInfo = await spawn('sw_vers', '-productVersion');
else if (platform === 'linux') {
const v = await spawn('cat', '/etc/os-release');
const distro = (v || '').match(/NAME="(.+)"/);
const versionInfo = (v || '').match(/VERSION="(.+)"/) || ['', ''];
const distro = String(v || '').match(/NAME="(.+)"/);
const versionInfo = String(v || '').match(/VERSION="(.+)"/) || ['', ''];
const versionStr = versionInfo !== null ? versionInfo[1] : '';
osInfo = `${distro[1]} ${versionStr}`.trim() || '';
}
Expand Down
Loading

0 comments on commit ee1535a

Please sign in to comment.