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

template-curly-spacing is inconsistent with other curly rules #960

Closed
sbking opened this issue Jul 28, 2017 · 2 comments

Comments

@sbking
Copy link

commented Jul 28, 2017

All of the following are given as proper examples on standardjs.com:

function foo () { return true }
var obj = { 'key': 'value' }
import { myFunc1, myFunc2 } from 'module'
const { a: { b } } = foo
setTimeout(function () { alert('Hello world') })

But this is considered incorrect:

const message = `Hello, ${ name }`

This seems to be the only case where curly spacing is not allowed, which seems like a strange inconsistency.

@myknbani

This comment has been minimized.

Copy link

commented Aug 4, 2017

I guess it helps to visually spot { key: 'value' } from template vars.

JSX also has a similar convention. height={expressionInsideJsx} and style={{ height: 14, color: 'red' }}

@stale

This comment has been minimized.

Copy link

commented May 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label May 10, 2018

@stale stale bot closed this May 17, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 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.