Rome Formatter, a new formatter for JavaScript and TypeScript
rome.tools
@rometools
- 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()
2ality.com
@2ality
Class ShadowRealm provides a new way of evaluating code at runtime – think eval() but better:
- Each instance has its own global JavaScript scope.
- 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
guybedford.com
@guybedford
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
14 ESLint rules to help you write asynchronous code in JavaScript
maximorlov.com
@_maximization
Explains how the following ESLint rules can help with asynchronous code:
no-async-promise-executor
no-await-in-loop
no-promise-executor-return
require-atomic-updates
max-nested-callbacks
no-return-await
prefer-promise-reject-errors
node/handle-callback-err
node/no-callback-literal
node/no-sync
@typescript-eslint/await-thenable
@typescript-eslint/no-floating-promises
@typescript-eslint/no-misused-promises
@typescript-eslint/promise-function-async
|