2

我该如何使用这个插件

https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-pipeline-operator

并阻止 VS Code 在|>不完全关闭错误检查的情况下向我询问操作员?

任何建议表示赞赏!

4

1 回答 1

2

VSCode 的默认 JSLinter 应该被禁用。

/.vscode/settings.json:

{
  "javascript.validate.enable": false
}

这是我的项目设置:

/.vscode/settings.json:同上

/package.json:

"devDependencies": {
  "@babel/core": "^7.0.0-beta.42",
  "@babel/plugin-proposal-pipeline-operator": "^7.0.0-beta.42",
  "@babel/preset-env": "^7.0.0-beta.42",
  "babel-eslint": "^8.2.2",
  "eslint": "^4.19.1",
  "eslint-config-standard": "^11.0.0",
  "eslint-plugin-import": "^2.9.0",
  "eslint-plugin-node": "^6.0.1",
  "eslint-plugin-promise": "^3.7.0",
  "eslint-plugin-standard": "^3.0.1"
}

/.eslintrc

{
  "parser": "babel-eslint",
  "extends": "standard"
}

/.babelrc

{
  "presets": ["@babel/preset-env"],
  "plugins": ["@babel/plugin-proposal-pipeline-operator"]
}

VSCode 的 ESLinter 运行良好 :)

于 2018-03-28T03:47:22.293 回答