Skip to content

Instantly share code, notes, and snippets.

View martinadamsdev's full-sized avatar

martinadamsdev martinadamsdev

View GitHub Profile
@martinadamsdev
martinadamsdev / migratingRules.md
Created September 24, 2021 02:13 — forked from Jaid/migratingRules.md
ESLint rules for migrating projects from CommonJS to ESM

ESLint rules

The ESM standard is considered stable in NodeJS and well supported by a lot of modern JavaScript tools.

ESLint does a good job validating and fixing ESM code (as long as you don't use top-level await, coming in ESLint v8). Make sure to enable the latest ECMA features in the ESLint config.

  • .eslint.json
{