michalrus / git-hooks-code-autoformat

Apache License 2.0
87 stars 24 forks source link

Can't find formatter specific to js-2016 inline HTML #9

Closed aahutsal closed 7 years ago

aahutsal commented 7 years ago

Hello guys. Have some need to keep my JS files formatted in github repo and among peoples. Have such bloc in one file

    render() {
        const { application, services, iWantTos, stages, actions, gameplan, dispatch } = this.props;

        return (
             <div className={styles.root}>
           <div className={styles.hero}>

              <img
                alt="A staircase up to the next level of your startup."
                src={`${imgPath}mobile-landingPage-staircase.png`}
                srcSet={`
                  ${imgPath}mobile-landingPage-staircase@2x.png 2x,
                  ${imgPath}mobile-landingPage-staircase@3x.png 3x
                `}
                className={styles.heroImage}
              />

The second div line is improperly aligned as you see. It should be nested, but it does not. I've slightly modified typescript formatter, but this does not help, Any suggestion?

michalrus commented 7 years ago

Hey, @gutsal-arsen!

I’d say the style of formatting is an issue for https://github.com/vvakame/typescript-formatter — we’re just calling it, cf. https://github.com/michalrus/git-hooks-code-autoformat/blob/afbe94b6d21f62f5d5387f8c3f19308dea1e76e6/autoformat/typescript

Wouldn’t you say so?

aahutsal commented 7 years ago

Well, I've already found the solution. https://stackoverflow.com/questions/44799236/cant-find-formatter-specific-to-js-2016-inline-html Thank you, @michalrus

michalrus commented 7 years ago

Thanks!