需要注意,这里要修改typescript的版本为4.5.5。
全局
npm uninstall -g typescript
npm install -g typescript@4.5.5
项目
pnpm uninstall typescript
pnpm install typescript@4.5.5 -D
注意.prettierrc.js应该以.cjs结尾
.eslintrc.json
"rules": {
"vue/multi-word-component-names": "off",
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"{}": false
}
}
],
"@typescript-eslint/no-explicit-any": ["off"]
}
这篇文章在这一部分
接下来我们为我们git仓库添加一个
pre-commit钩子,运行...
使用第一部分即可
最后要添加一个.eslintignore文件
/dist