eslint --fix, babel, lebab, uglifyjs and rollup: I'm extremely impressed with the versatility of the AST transformation ecosystem in JS!
miniblog.
Related Posts
Fun post looking at an impressive transformation in clang and tracing it through the different optimisation passes:
I've been implementing a quasiquoter as part of the wonderful Make-A-Lisp project: https://github.com/kanaka/mal
This has been the most interesting part so far! I now have a pretty good understanding of how it's an AST transformation that you later eval. I.e. basically a macro.
Cute idea (in a rather dramatic blog post): randomly generate strings for PL keywords, and apply the same transformation to your source code.
This prevents code injection: https://blog.polyverse.io/introducing-polyscripting-the-beginning-of-the-end-of-code-injection-fe0c99d6f199
(I suppose you could brute force, and they don't say if it breaks eval.)