小编Vah*_*Run的帖子

Visual Studio Code [eslint] 在 Windows 上删除“CR” [prettier/prettier]

vscode终端中的Eslint错误

获得 CR 的 ESLint 错误 - 即使我有带有 Windows 行结尾的 git pull 代码。

这发生在带有 EsLint 插件 (1.7.0) 的 Visual Studio Code 上直到我最近将我的 git 更新到最新版本 (2.20.0).windows.1 才发生这种情况

我的 eslintrc 文件

 {
  "plugins": [
    "jsx-a11y",
    "react",
    "prettier"
  ],
  "extends": [
    "eslint:recommended",
    "plugin:react/recommended",
    "prettier"
  ],
  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true,
      "generators": true,
      "experimentalObjectRestSpread": true
    }
  },
  "env": {
    "browser": true,
    "commonjs": true,
    "es6": true,
    "node": true,
    "jquery": true
  },
  "globals": {
    "define": true
  },
  "rules": { …
Run Code Online (Sandbox Code Playgroud)

git reactjs eslint visual-studio-code vscode-settings

8
推荐指数
2
解决办法
1万
查看次数