错误消息'删除nest js项目中的`␍`eslintprettier/prettier'

问题描述 投票:0回答:1

代码更漂亮 漂亮的

{
  "singleQuote": true,
  "trailingComma": "all"
}

eslintc.js

    module.exports = {
      parser: '@typescript-eslint/parser',
      parserOptions: {
    project: 'tsconfig.json',
    tsconfigRootDir: __dirname,
    sourceType: 'module',
  },
  plugins: ['@typescript-eslint/eslint-plugin'],
  extends: [
    'plugin:@typescript-eslint/recommended',
    'plugin:prettier/recommended',
  ],
  root: true,
  rules: {
    'prettier/prettier': ['error', { "singleQuote": true, "parser": "flow" }],
    '@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',
  },
  env: {
    node: true,
    jest: true,
  },
  ignorePatterns: ['.eslintrc.js'],
};

我想解决在 Nest js 项目中显示错误消息“Delete

eslintprettier/prettier”的错误,我最近开始在我的后端项目中使用 Nest,并且我从代码 prettier 和 eslint idk 中收到了很多错误如何解决它

eslint nest prettier prettier-eslint
1个回答
0
投票

顺便说一句,这个问题已经有答案了 链接:为什么我总是收到“[eslint]删除`CR`[更漂亮/更漂亮]”?

    rules: {
     'prettier/prettier': [
      'error',
      {
        endOfLine: 'auto',
      },
       ],
    'prettier/prettier': ['error', { "singleQuote": true, "parser": "flow" }],
    '@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',
  },
  env: {
    node: true,
    jest: true,
  },
  ignorePatterns: ['.eslintrc.js'],
};
© www.soinside.com 2019 - 2024. All rights reserved.