palantir / tslint-react

:orange_book: Lint rules related to React & JSX for TSLint.
Apache License 2.0
749 stars 76 forks source link

jsx-alignment: Option to allow / disallow newline before closing html bracket #175

Closed cromefire closed 5 years ago

cromefire commented 6 years ago

Current behavior with this rule:

//      vvvvvvv Error, because there needs to be a newline
<Button primary
        raised
        ripple
        type={"submit"}
        style={{ margin: "1rem" }}/>
//                                ^ Error, because there is no new line

Proposed options:

"jsx-alignment": ["no-newline-before-closing-bracket", "no-newline-before-props"]

to disallow newlines respectively.

adidahiya commented 5 years ago

Closing due to the deprecation timeline and maintenance burden of formatting rules, see #210