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

disable no-multi-str #532

Closed
NodeGuy opened this issue May 26, 2016 · 8 comments

Comments

@NodeGuy
Copy link

commented May 26, 2016

I'm being warned that multiline support is limited to browsers supporting ES5 only. (no-multi-str)

foobar = 'This is a multiline \
string that is allowed by the rules \
but I am being warned anyway.'

Multiline strings aren't prohibited by the rules here: https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style

I don't imagine we want the warnings to prevent usage of features found only in ES5 and above. Let's disable this warning.

Standard version is 7.1.1.

@feross

This comment has been minimized.

Copy link
Member

commented May 26, 2016

This is preferred:

foobar = 'This is a multiline \n' +
'string that is allowed by the \n' +
'rules'

@feross feross closed this May 26, 2016

@NodeGuy

This comment has been minimized.

Copy link
Author

commented May 27, 2016

Ugh. Mind telling me why?

@jprichardson

This comment has been minimized.

Copy link
Member

commented May 27, 2016

https://github.com/feross/standard#i-disagree-with-rule-x-can-you-change-it

At the end of the day you have to 'just pick something', and that's the whole philosophy of standard -- its a bunch of sensible 'just pick something' opinions. Hopefully, users see the value in that over defending their own opinions.

@NodeGuy

This comment has been minimized.

Copy link
Author

commented May 27, 2016

I agree wholeheartedly with the philosophy of the standard. I'm genuinely curious about the rationale for this one.

@feross

This comment has been minimized.

Copy link
Member

commented May 27, 2016

They're exactly equivalent, so we prefer having only one way to do things.

@NodeGuy

This comment has been minimized.

Copy link
Author

commented May 27, 2016

Got it, thank you.

@rstacruz

This comment has been minimized.

Copy link
Member

commented May 27, 2016

Also, if the js runtime youre using supports multiline strings, then it
probably also supports template strings, which you can use for multiline
too with a much better syntax.

On Fri, May 27, 2016, 10:40 AM David Braun notifications@github.com wrote:

Got it, thank you.


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub
#532 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAEikUM02thufamLmM2UXYO079UgBZ1yks5qFlmOgaJpZM4IntKV
.

@NodeGuy

This comment has been minimized.

Copy link
Author

commented May 27, 2016

THANK YOU! You just made my night!

@lock 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.
4 participants
You can’t perform that action at this time.