Skip to content

Commit ee1535a

Browse files
dimaslanjakayoshinorin
andauthoredMay 7, 2023
fix TS2322 and update @typescript-eslint/* (#479)
* 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/eslint-plugin@5.59.2 - @typescript-eslint/parser@5.59.2 * chore: restore lock file from hexojs/hexo-cli * chore(deps): reinstall using `npm@8` --------- Co-authored-by: yoshinorin <yoshinorin.net@outlook.com>
1 parent 40cdf2a commit ee1535a

File tree

4 files changed

+69
-412
lines changed

4 files changed

+69
-412
lines changed
 

‎.gitmodules

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[submodule "assets"]
22
path = assets
33
url = https://github.com/hexojs/hexo-starter.git
4+
branch = master

‎lib/console/version.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ async function versionConsole() {
1313

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

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

‎package-lock.json

+63-407
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
"devDependencies": {
5454
"@types/bluebird": "^3.5.37",
5555
"@types/node": "^18.11.8",
56-
"@typescript-eslint/eslint-plugin": "^5.41.0",
57-
"@typescript-eslint/parser": "^5.41.0",
56+
"@typescript-eslint/eslint-plugin": "^5.59.2",
57+
"@typescript-eslint/parser": "^5.59.2",
5858
"chai": "^4.3.4",
5959
"eslint": "^8.2.0",
6060
"eslint-config-hexo": "^5.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.