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

we need to determine JS/TS code policy #65

Open
1 task done
tukib opened this issue Dec 6, 2023 · 2 comments
Open
1 task done

we need to determine JS/TS code policy #65

tukib opened this issue Dec 6, 2023 · 2 comments

Comments

@tukib
Copy link
Member

tukib commented Dec 6, 2023

Problem

Both JavaScript and TypeScript exist and can be used in our project. We have no policy to inform contributors whether they can check in both files, or if we require JS-only or TS-only.

Context

For now, I propose we allow both. Our contributors have mixed preferences, so this is where we currently stand. No configuration changes need to be pushed for this.

this depends on

@tukib tukib added the needs triage This is a new issue that needs to be reviewed. label Dec 6, 2023
@seanmakesgames seanmakesgames removed the needs triage This is a new issue that needs to be reviewed. label Dec 7, 2023
@kbinreallife
Copy link
Member

This issue seems to be in good shape and ready to close, thoughts?

@tukib
Copy link
Member Author

tukib commented Mar 25, 2024

@kbinreallife I think so. A short description in CONTRIBUTING.md would suffice. How about this (below)? Last point replaces the current section on tests. we can leave the whole esm/cjs thing for #71.


Editing remark/rehype plugins or react components may require making changes to code.

  • Either JavaScript or TypeScript is permitted (any of .js .mjs .ts .jsx .tsx)
  • When adding new files, try to conform to the existing structure.
    • e.g. it's reasonable to create the directory /src/plugins/remark/ for the first remark plugin, since we already have /src/plugins/rehype/ for rehype plugins.
  • Every file should have a corresponding test file in the same directory that describes the intended behaviour, within reason.
    • e.g. foo.js and bar.ts should have tests foo.test.js and bar.test.ts

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

No branches or pull requests

3 participants