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

Documentation or formatter for consistent spacing rules #228

Closed
nknapp opened this issue Aug 12, 2015 · 1 comment
Closed

Documentation or formatter for consistent spacing rules #228

nknapp opened this issue Aug 12, 2015 · 1 comment
Labels

Comments

@nknapp
Copy link

nknapp commented Aug 12, 2015

I'm would like to have documentation on rules about consistent spacing. I had a file containing a line similar to

console.log({ arr: [{ a: 'aa'}, { a: 'bb'}]})

which is not consistently spaced, appearently. I changed it to

console.log({ arr: [{ a: 'aa' }, { a: 'bb' }]})

which still didn't work. Then wondered, if "consistent" meant "consistent across the project/file/statement".
Finally I found out that the following examples work

console.log({ arr: [{ a: 'aa' }, { a: 'bb' }] })
console.log({ arr: [{a: 'aa'}, { a: 'bb' }] })

The best thing would be to have the formatter correct those errors automatically based on the initial spacing. Second best would be documentation with a few example about what is allowed and what isn't.

@feross
Copy link
Member

feross commented Aug 13, 2015

Thanks for pointing out that this is confusing. I opened an issue on standard-format for this: max-mapper/standard-format#95

@feross feross closed this as completed Aug 13, 2015
@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants