代码更漂亮 漂亮的
{
"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]删除`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'],
};