3 ms·
That actually wouldn't be hard to make; just use a custom eslint rules! If you want implicit returns and really want to disable "fancy features", babel plugins
by rattray 9y ago
That actually wouldn't be hard to make; just use a custom eslint rules!
If you want implicit returns and really want to disable "fancy features", babel plugins are fairly easy to create – blacklisting certain constructs wouldn't be very difficult, and implicit returns aren't so hard (you can copy my implementation[0] from a JS superset I built called LightScript[1]).
EDIT: bonus of building on babel is that you can get static types for free à la Flow (though typechecking implicit returns may be a pain).
[0] - https://github.com/lightscript/babel-plugin-lightscript/blob/master/src/index.js#L366 https://github.com/lightscript/babel-plugin-lightscript/blob...
[1] - http://lightscript.org http://lightscript.org
- weberc2 9y agoVery cool! I can live without implicit returns. Thanks for the info!