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

using "class" results in "Unexpected reserved word" error #1235

Closed
mojoaxel opened this issue Dec 10, 2018 · 4 comments

Comments

@mojoaxel
Copy link

commented Dec 10, 2018

What version of standard?

  • standard@^12.0.1

What operating system, Node.js, and npm version?

  • node: v10.10.0
  • npm: v6.4.1
  • OS: ubuntu 18

What actually happened?

index.js:

class abc {
  constructor() {
    console.log("It's alive!");
  }
}
module.exports = abc

Calling standard without any special configuration results in an error:

Error: Use JavaScript Standard Style (https://github.com/feross/standard)
  index.js:1:1: Unexpected reserved word
@LinusU

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

I cannot reproduce this 🤔

screenshot 2018-12-10 at 13 56 15

@mojoaxel

This comment has been minimized.

Copy link
Author

commented Dec 10, 2018

@LinusU Thanks for your response. Maybe I'm doing something wrong? I have this project in this project: https://github.com/nbesli/pdf-merger-trvl

@LinusU

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

Works for me.

screenshot 2018-12-10 at 14 14 36

Could it be that you have an old version of standard earlier in your $PATH? What does standard --version print?

@mojoaxel

This comment has been minimized.

Copy link
Author

commented Dec 10, 2018

Could it be that you have an old version of standard earlier in your $PATH? What does standard --version print?

Yes that was the problem 🤦‍♂ I feel so stupid, but I guess we all have days like that...
@LinusU Thanks again for the help! Enjoy the holidays.

@mojoaxel mojoaxel closed this Dec 10, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.