nestjs project: nest new demo-project has eslint and prettier configuration conflicts

Create a nestjs project

nest new demo-project

Enter the project folder to run the project execution: npm run start:
red underline appears in the dev project, the reason is that eslint and prettier configuration conflict
insert image description here

problem solving

Open the .eslintrc.js file comment and adjust 'plugin:prettier/recommended' in extends,

  extends: [
    'plugin:@typescript-eslint/recommended',
    // 'plugin:prettier/recommended', //该行注释掉
  ],

Guess you like

Origin blog.csdn.net/shengmeshi/article/details/128792772