- Rome Formatter mimics Prettier’s styling as much as possible.
- Existing code formatters are not robust w.r.t. syntax errors: a single error can hold up formatting for the rest of the code. In contrast, Rome Formatter works well with incorrect code.
- Implemented in Rust and 9–12 times faster than Prettier in their tests.
- Future: Rome Formatter will be expanded to support more web languages such as CSS, HTML, and JSON.
ShadowRealms – an ECMAScript proposal for a better eval()
provides a new way of evaluating code at runtime – think
- Code is evaluated in that scope. If it changes global data, that only affects the ShadowRealm, but not the real global data.
How ES Module Shims became a production Import Maps polyfill
Import Maps are now supported by 70% of users and Firefox just announced they are starting to implement them. For browsers that don’t support Import Maps, we can use ES Module Shims, a production-suitable polyfill. This post provides deeper insight into this polyfill:
- The project’s architecture
- How the polyfill mode came about
- Performance benchmarks
- Ideas for the future of the project
Explains how the following ESLint rules can help with asynchronous code: