Skip to content

Commit ce6e73d

Browse files
authored
upgrade: 清理和升级依赖 (#396)
1 parent 656893f commit ce6e73d

26 files changed

+535
-224
lines changed

README.md

+5-12
Original file line numberDiff line numberDiff line change
@@ -347,18 +347,14 @@ npm config delete https-proxy
347347

348348
#### 1)安装 `nodejs`
349349

350-
推荐安装 nodejs `16.x.x` 的版本,其他版本未做测试
350+
推荐安装 nodejs `22.x.x` 的版本,其他版本未做测试
351351

352-
#### 2)安装 `lerna`
352+
#### 2)安装 `pnpm`
353353

354354
运行如下命令即可安装所需依赖:
355355

356-
> 注:lerna指定为6.x版本,更高版本会导致打包失败(不兼容导致)
357-
358356
```shell
359-
npm install -g cnpm --registry=https://registry.npmmirror.com
360-
361-
cnpm install -g lerna@6
357+
npm install -g pnpm --registry=https://registry.npmmirror.com
362358

363359
```
364360

@@ -372,11 +368,8 @@ git clone https://github.com/docmirror/dev-sidecar
372368

373369
cd dev-sidecar
374370

375-
# 注意不要使用 `npm install` 来安装依赖,因为 `lerna bootstrap` 会自动安装依赖
376-
lerna bootstrap
377-
# 如果 `lerna bootstrap` 有报错,可以尝试执行如下两行命令,用yarn替换掉npm:
378-
#cnpm install -g yarn
379-
#lerna bootstrap --npm-client=yarn
371+
# 注意不要使用 `npm install` 来安装依赖,因为 `pnpm` 会自动安装依赖
372+
pnpm install
380373

381374
# 运行DevSidecar
382375
cd packages/gui

eslint.config.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default antfu(
4+
{
5+
vue: {
6+
vueVersion: 2,
7+
},
8+
rules: {
9+
'style/brace-style': ['error', '1tbs'],
10+
'style/space-before-function-paren': ['error', 'always'],
11+
'import/newline-after-import': 'off',
12+
'import/first': 'off',
13+
'perfectionist/sort-imports': 'off',
14+
'node/prefer-global/buffer': 'off',
15+
'node/prefer-global/process': 'off',
16+
'no-console': 'off',
17+
},
18+
ignores: [
19+
'**/build/*',
20+
'**/dist_electron',
21+
],
22+
formatters: {
23+
css: true,
24+
html: true,
25+
markdown: 'prettier',
26+
},
27+
},
28+
)

package.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
22
"name": "dev-sidecar-parent",
3+
"type": "module",
34
"private": false,
45
"packageManager": "[email protected]",
56
"author": "Greper",
6-
"license": "MPL-2.0"
7+
"license": "MPL-2.0",
8+
"scripts": {
9+
"lint": "eslint .",
10+
"lint:fix": "eslint . --fix"
11+
},
12+
"devDependencies": {
13+
"@antfu/eslint-config": "^3.9.1",
14+
"eslint": "^9.15.0",
15+
"eslint-plugin-format": "^0.1.2"
16+
}
717
}

0 commit comments

Comments
 (0)