Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate CJS require/exports to ESM import/export #1221

Merged
merged 10 commits into from Aug 12, 2023
Merged

Conversation

azu
Copy link
Member

@azu azu commented Aug 12, 2023

migrate CJS require/exports to ESM import/export using commonjs-to-es-module-codemod.

#!/usr/bin/env bash

npm install -g jscodeshift
LATEST_VERSION=$(npm view commonjs-to-es-module-codemod version)
jscodeshift -t "https://unpkg.com/commonjs-to-es-module-codemod@${LATEST_VERSION}/dist/index.js" --parser ts --extensions ts \
./packages/@textlint/**/src/**/*.ts

@@ -28,7 +28,6 @@
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/",
"example:build": "browserify example/js/index.js -o example/app/app.js",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not used

@azu azu merged commit d701240 into master Aug 12, 2023
17 checks passed
@azu azu deleted the esm-module branch August 12, 2023 12:57
@github-actions github-actions bot mentioned this pull request Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant