Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当前提供的库和vue命令行安装的库并不相同,是否同步为官方推荐的库? #261

Closed
you-hengh opened this issue Feb 17, 2024 · 2 comments

Comments

@you-hengh
Copy link

{
  "devDependencies": {
    "@rushstack/eslint-patch": "^1.7.2",
    "@tsconfig/node18": "^18.2.2",
    "@types/node": "^18.19.17",
    "@vitejs/plugin-vue": "^4.6.2",
    "@vue/eslint-config-prettier": "^8.0.0",
    "@vue/eslint-config-typescript": "^12.0.0",
    "@vue/tsconfig": "^0.5.1",
    "eslint": "^8.56.0",
    "eslint-plugin-vue": "^9.21.1",
    "prettier": "^3.2.5",
    "typescript": "~5.3.3",
    "vite": "^5.1.3",
    "vue-tsc": "^1.8.27"
  }
}

我是用pnpm 创建了vue3项目,在模板提示中 开启了eslint相关配置

上面是自动安装的eslint相关配置, 我留意到和当前项目推荐的库并不一致

是否应该同步官方所使用的库文件呢?

@you-hengh
Copy link
Author

@xcatliu 有空看看吗?

@xcatliu
Copy link
Member

xcatliu commented Mar 6, 2024

@vue/eslint-config-typescript 这个是 vue cli 默认的 eslint 配置吧。这个配置是 vue 官方维护的,也挺适用的,如果不想折腾的话,可以就用官方这个。

不过 eslint 本身就是非常灵活的,也可以切换为 alloy 的配置,先把 @vue/eslint-config-typescripteslintrc 中的相关配置移除,然后添加 alloy 的 vue 规则就可以了

@xcatliu xcatliu closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants