Nest.js 创建项目中遇到错误,持续更新

1、Parsing error: Cannot read file ‘c:\users\xxx\desktop\demo\tsconfig.json‘

解决方案:将下列代码放到.eslintrc.js中

parserOptions: {
	tsconfigRootDir: __dirname,
}
图片[1]|Nest.js  创建项目中遇到错误,持续更新|子归云

2、安装eslint后格式化各种报错

解决方案:

vscode 搜索、安装插件 prettier。配置prettier.eslintIntegration 为true 。完美解决

"editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    }
图片[2]|Nest.js  创建项目中遇到错误,持续更新|子归云
© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容