Webpack loader to get rid of parentheses in es6 / 7

We've been using CoffeeScript for the past year and have really started to love white space over curly braces.

ES6 / 7 and babel are starting to look really cool and unfortunately CoffeeScript is a bit like being reluctant / slow to introduce new features . (Perhaps partly because it's not easy to do.)

We are thinking about the possibility of creating a webpack loader that will run as the first step and just look at the js files and based on the indentation add curly braces where needed. Similarly, we could write es6 / 7 code, but not write (and read !!) those ugly parentheses in the source code :)

Does anyone have similar attempts? What consequences could you see doing this?

+3


source to share


1 answer


I just did it. Check out: https://github.com/rstuven/curlyfy-loader



The only big problem I see right now, apart from the hordes of disgruntled purists wanting to rip their bodies apart, there is no IDE support or syntax highlighting to do this.

+2


source







All Articles