0

I am trying to write a school project in React with react-router v4 in web-mode. When i try to write the render props function web-mode inserts 4 spaces instead of the desired 2.

<Switch>
  <Route
    path={'/home'}
    render={ (props) => (
        <Home {...props} />  <--- 4 spaces
      )} />                  <--- this should be aligned with the 'r'
</Switch>

web-mode-code/markup/css-indentaion-offset are all set to 2.

This becomes a hugh pain both mentally and because of eslint rules that we use.

1

The version 14.1.17 of web-mode solves those two issues : https://github.com/fxbois/web-mode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.