Tslint: Space around Destructuring assignment braces?

Created on 26 Feb 2017  ·  3Comments  ·  Source: palantir/tslint

This may already exist but I can't seem to find it, how would I enforce putting spaces on the inside of the braces in destructuring assignment?

const {resize} = state.requests; // current
vs
const { resize } = state.requests; // wanted
Duplicate

Most helpful comment

It looks like in eslint, this is the object-curly-spacing rule:
http://eslint.org/docs/rules/object-curly-spacing

Though it isn't supported by tslint natively, it does look like the tslint-eslint-rules project has added support for it:
https://github.com/buzinas/tslint-eslint-rules/blob/master/src/docs/rules/objectCurlySpacingRule.md

All 3 comments

It looks like in eslint, this is the object-curly-spacing rule:
http://eslint.org/docs/rules/object-curly-spacing

Though it isn't supported by tslint natively, it does look like the tslint-eslint-rules project has added support for it:
https://github.com/buzinas/tslint-eslint-rules/blob/master/src/docs/rules/objectCurlySpacingRule.md

Are there any plans to add this to tslint natively?
The absence of this rule also affects object literal declaration

duplicate of #1044

Was this page helpful?
0 / 5 - 0 ratings