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

Multi-Line String #646

Closed
Beastio opened this issue Oct 3, 2016 · 1 comment

Comments

@Beastio
Copy link

commented Oct 3, 2016

There is a lot of differing styles out in the wild for multi-line and template, strings. I have a simple proposal that makes multi-lines much nicer ensuring the first-line maintains its internal alignment and doesn't use a function that manipulates the string to strip indentation.

;(()=> {
  const func = ()=> {
    const multi = `\
1. Escape first return
2. Dedent to page edge`
    return multi //move back to previous indentation level
  }
  return func()
})()
@feross

This comment has been minimized.

Copy link
Member

commented Oct 3, 2016

Looks reasonable to me. But this isn't something that we can enforce with ESLint. Feel free to use this style in your code!

@feross feross closed this Oct 3, 2016

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