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

feat(git-validator): count for the expression of top-level-await #208

Closed
zanminkian opened this issue Apr 10, 2024 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@zanminkian
Copy link
Owner

zanminkian commented Apr 10, 2024

In node22, require can import esm module (experimental). I don't like this feature honestly . I think cjs should go to the dust bin. We shuold not save cjs (require) any more.

@zanminkian zanminkian added the enhancement New feature or request label Apr 10, 2024
@zanminkian zanminkian changed the title feat(git-validator): count for the expression of to-level-await feat(git-validator): count for the expression of top-level-await May 20, 2024
@zanminkian
Copy link
Owner Author

zanminkian commented Dec 5, 2024

Way 1: We may ban top-level-await.
Way 2: Just like eslint-plugin-top do, disallow top level side effects.

Js is a script, using statement on top level is not a good practice.

for(let i = 0; i < 100; i++) {
  // doing stuff
}

export const foo = xx;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant