Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel ENV Issue Caused Only by Standard VS Code Extension #280

Open
argctl opened this issue Sep 8, 2021 · 1 comment
Open

Babel ENV Issue Caused Only by Standard VS Code Extension #280

argctl opened this issue Sep 8, 2021 · 1 comment
Labels

Comments

@argctl
Copy link

argctl commented Sep 8, 2021

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] : 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: "")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.

@argctl
Copy link
Author

argctl commented Sep 8, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants