ESLint wrapper for migrating JavaScript/TypeScript projects from CommonJS (CJS) to ES Modules (ESM). Version 6.2.0. This tool bundles a set of ESLint rules (e.g., from eslint-plugin-import, eslint-plugin-node) with autofix support to automate the migration. Unlike manual ESLint configuration, it provides a zero-config CLI that wraps standard ESLint arguments. It is actively maintained and supports both .js and .ts file extensions. The tool is designed for one-time migration, not as a permanent linting setup.
npm install eslint-cjs-to-esmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Run migration with autofix on all JS/TS files under src. Note the required './' prefix.
Prefix your glob pattern with './'.
Ensure ESLint is v8.x or refer to the tool's peerDependencies.
Use eslint-plugin-import's 'extensions' rule instead.
Use it once, then switch to standard ESLint config.
Use './src/**/*.{js,ts}' (with './').Ensure the glob argument is a string starting with './'.