Skip to content

Conversation

@ryoppippi
Copy link
Member

@ryoppippi ryoppippi commented Dec 11, 2025

Summary

  • Disable unicorn/prefer-top-level-await in library code (src/) to ensure compatibility with consumers who may not support ES modules with top-level await
  • Enable unicorn/prefer-top-level-await in examples/ for cleaner, more readable scripts
  • Add examples override with no-console off for script-style files

References

Test plan

  • pnpm lint passes
  • All existing tests pass

- Disable top-level await in library code (src/) to ensure compatibility
  with consumers who may not support ES modules with top-level await
- Enable top-level await in examples/ for cleaner, more readable scripts
- Add examples override with no-console off for script-style files
@ryoppippi ryoppippi requested a review from a team as a code owner December 11, 2025 17:48
Copilot AI review requested due to automatic review settings December 11, 2025 17:48
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@218

commit: 6cfb0ea

- Add unicorn/prefer-module rule globally to enforce ESM patterns
- Disallows __dirname/__filename in favour of import.meta.url
- Disallows require() in favour of import
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR configures the unicorn/prefer-top-level-await ESLint rule to ensure library code remains compatible with consumers while enabling cleaner code patterns in example scripts.

  • Disables unicorn/prefer-top-level-await in library source code (src/) for maximum compatibility
  • Enables unicorn/prefer-top-level-await in examples/ directory to encourage modern async patterns
  • Adds no-console override for example files to allow console output in scripts

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@ryoppippi ryoppippi enabled auto-merge (squash) December 11, 2025 18:20
Copy link
Contributor

@glebedel glebedel left a comment

Choose a reason for hiding this comment

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

LGTM

@ryoppippi ryoppippi merged commit 1254196 into main Dec 11, 2025
9 checks passed
@ryoppippi ryoppippi deleted the feat/oxlint-prefer-top-level-await branch December 11, 2025 18:25
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.

3 participants