docs: convert remaining code examples from CommonJS to ESM
Open
Beginner friendly
Nobody has claimed this yet.
auto-triage-skip
docs
enhancement
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 445
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 28
Description
Summary
The quickstart guides and README were updated to use ESM imports in #2923. The remaining docs still use require() syntax and should be converted to import for consistency.
Files to update
English:
docs/english/concepts/authenticating-oauth.mddocs/english/concepts/custom-routes.mddocs/english/concepts/deferring-initialization.mddocs/english/concepts/error-handling.mddocs/english/concepts/logging.mddocs/english/concepts/message-listening.mddocs/english/concepts/receiver.mddocs/english/concepts/socket-mode.mddocs/english/concepts/token-rotation.mddocs/english/deployments/aws-lambda.mddocs/english/tutorials/code-assistant.md
Japanese:
docs/japanese/concepts/authenticating-oauth.mddocs/japanese/concepts/custom-routes.mddocs/japanese/concepts/deferring-initialization.mddocs/japanese/concepts/error-handling.mddocs/japanese/concepts/logging.mddocs/japanese/concepts/message-listening.mddocs/japanese/concepts/socket-mode.mddocs/japanese/deployments/aws-lambda.md
Out of scope
docs/english/legacy/steps-from-apps.mdanddocs/japanese/legacy/steps-from-apps.md— deprecated, no update needed.
Notes
- Most files are a straightforward
require→importswap. - Lambda deployment docs also use
module.exportswhich should becomeexport const handler.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the English and Japanese Markdown files listed under concepts, deployments, and tutorials, and search them for require() and module.exports; use the ESM examples already applied in the quickstart guides and README as the reference. Convert the in-scope examples, including the Lambda handlers, while leaving both legacy/steps-from-apps.md files unchanged. Done means all listed docs use ESM consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- Half a day
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100