VS Code error messages and Babel plugins

最后都变了- 提交于 2020-01-24 12:02:22

问题


How can I use this plugin

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

And stop VS Code from bugging me about the |> operator without completely turning off error checks?

Any suggestions appreciated!


回答1:


VSCode's default JSlinter should be disabled.

/.vscode/settings.json:

{
  "javascript.validate.enable": false
}

This is my project settings:

/.vscode/settings.json: Same above

/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's ESlinter works well :)



来源:https://stackoverflow.com/questions/48534825/vs-code-error-messages-and-babel-plugins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!