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

ESLint plugin for moonlight pitfalls #1

Open
NotNite opened this issue Oct 8, 2024 · 0 comments
Open

ESLint plugin for moonlight pitfalls #1

NotNite opened this issue Oct 8, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@NotNite
Copy link
Member

NotNite commented Oct 8, 2024

We tell people to not fall for pitfalls but it's hard. Cyn just wasted an unknown number of hours because tsc autocompleted a Flux store import and created a duplicate copy of it. We should look into how ESLint plugins work and use one in here & in the sample extension.

Some ideas:

  • directive to mark a file as never to be imported directly (this one is easy)
  • enforcing the moonlight env globals to be used only in the right entrypoints (probably impossible)
  • checks for using an extension or mapped module without it marked as a dependency (would require lots of AST bullshit)
  • checks for using Spacepack in a Webpack module without the needs declared (probably very hard if not impossible)
@NotNite NotNite added the enhancement New feature or request label Oct 8, 2024
@NotNite NotNite self-assigned this Oct 8, 2024
@NotNite NotNite transferred this issue from moonlight-mod/moonlight Jan 13, 2025
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