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

--source-type:"script" should given an error about an unknown argument (probably) #8597

Open
shashank-13 opened this issue Aug 31, 2018 · 1 comment

Comments

@shashank-13
Copy link

I was trying to transpile js files using babel cli with the latest upgrade.I had delete keyword in my file so it gave syntax error at that line since by default the files is parsed as es6 modules.Later I got to know from @loganfsmyth that I had to add the --source-type script to let the files be treated as scripts.
By mistake I also run a different version --source-type:"script" which though is syntactically incorrect didn't gave any errors related to bad arguments, rather it simply gives a BABEL_PARSE_ERROR at that delete keyword line.So the point is it should give a command error rather than giving an error which can mislead someone to think that the issue is again related with babel operating in strict mode.

I am attaching the screenshot.The first command in image gives an error while second one works just fine.

screenshot 4 _li

@babel-bot
Copy link
Collaborator

Hey @shashank-13! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@loganfsmyth loganfsmyth changed the title Babel transpiling files as scripts. --source-type:"script" should given an error about an unknown argument (probably) Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants