vscode-standard
vscode-standard copied to clipboard
Babel ENV Issue Caused Only by Standard VS Code Extension
What version of this package are you using? Newest as of 9/8/21 What operating system, Node.js, and npm version? MacOS/12 LTS What happened? When StandardJS extension is installed or enabled, I received a pointless error at the start of every file about envs. What did you expect to happen? Nothing Are you willing to submit a pull request to fix this bug? no
Here is the error I get at the top of my file:
Parsing error: [BABEL] <PATH>: Using babel-preset-react-app requires that you specify NODE_ENV or BABEL_ENV environment variables. Valid values are "development", "test", and "production". Instead, received: undefined. (While processing: "<Path>")standard
I don't even understand why standard is doing this. The old extension had issues with decorators, and this is happening ever since the upgrade. Please advise how I can get standard back to a useful formatting tool instead of a whining extra linter that I don't need.
I'm getting it to shut up about the non-exsistent error by utilizing a deprecated lib for now. Changed:
{
"standard": {
"parser": "@babel/eslint-parser"
}
}
from docs at https://github.com/standard/standard#how-do-i-use-experimental-javascript-es-next-features
to:
{
"standard": {
"parser": "babel-eslint"
}
}
I guess it doesn't matter because only standard is using this old deprecated library in my project, but whatever went into not making this break with the old eslint parser should probably be updated. I'm guessing standard is just doing too much. Most of us probably don't want standard looking for this type of error anyway.