问题
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