Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upstandard confuses string with missing quotes and new class instance without brackets #725
Comments
This comment has been minimized.
This comment has been minimized.
|
Just realised |
This comment has been minimized.
This comment has been minimized.
|
@lukechilds yup |
This comment has been minimized.
This comment has been minimized.
|
@dcousens according to ESLint this appears to be an issue with |
dcousens
reopened this
Dec 19, 2016
This comment has been minimized.
This comment has been minimized.
|
@lukechilds actually, it appears to be an issue on your end var Onionoo
const onionoo = new Onionoo
console.log(onionoo)standard: Use JavaScript Standard Style (http://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
/home/daniel/test.js:2:17: Missing '()' invoking a constructor.Do you have a test case we could try? |
dcousens
closed this
Dec 19, 2016
dcousens
reopened this
Dec 19, 2016
This comment has been minimized.
This comment has been minimized.
|
Ahhhh, found the culprit! It's not doing it if I call
Should I open the issue on |
dcousens
closed this
Dec 19, 2016
This comment has been minimized.
This comment has been minimized.
|
@lukechilds I think so, feel free to post back and we'll re-open if needed |
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
lukechilds commentedDec 19, 2016
If I have the code:
to create a new instance of the
Onionooclass but leave off the brackets:standard says:
It seems like maybe it assumes
Onionoois a string without quotes. It would be better if it would warn that there are no parenthesis on the class (or not warn at all, not sure of the pros/cons of leaving off parenthesis). I would assume this would be fairly easy to fix by checking if thenewkeyword is directly before the string.