nestjs 新建项目,vscode prettier报错解决
2022-12-18 本文已影响0人
Angeladaddy
这个问题就困扰我很久,一直没法解决。具体表现如下:
![](https://img.haomeiwen.com/i1431816/c5dffbc4af801b23.png)
偶然google到解决办法:在项目eslintrc.js
中添加一行,症状就消失了,治好了我多年的颈椎病
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'prettier/prettier': ['error', { endOfLine: 'off' }], //加这一句
},