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

Add tests #7

Closed
timja opened this issue Jul 17, 2022 · 5 comments · Fixed by #41
Closed

Add tests #7

timja opened this issue Jul 17, 2022 · 5 comments · Fixed by #41
Labels

Comments

@timja
Copy link
Owner

timja commented Jul 17, 2022

No description provided.

@jetersen
Copy link
Contributor

jetersen commented Jul 22, 2022

Some suggestion for pure javascript

Hook up eslint and prettier and unicorn. Unicorn has sane defaults for modern javascript.
See my PR here updatecli/updatecli-action#100

Add jsconfig.json should help with improve type detection for vscode.
Add jsconfig.json in your test folder that helps with jest type annotations.

index.js should really only be routing probot.

Everything else should be imported. FYI probot blocks you from switching to ESM. So stick with commonjs due to: probot/pino#188
Because of it you need to turn off some features of unicorn, see release-drafter eslintrc

@timja
Copy link
Owner Author

timja commented Jul 22, 2022

Sure can have a look at unicorn.

Prettier is already in place here.

The typings already seem to work quite well but can add if it helps more.

and yeah will do eslint.

I have the start of some jest tests locally but didn't get much time yesterday on it.


Thanks for the suggestions

@jetersen
Copy link
Contributor

Link to unicorn eslint plugin at least: https://github.com/sindresorhus/eslint-plugin-unicorn

@timja
Copy link
Owner Author

timja commented Jul 22, 2022

Link to unicorn eslint plugin at least: sindresorhus/eslint-plugin-unicorn

:) I found it in your PR, but that would've helped, it didn't come up on google (without adding eslint to search)

@jetersen
Copy link
Contributor

Great stuff 👏

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

Successfully merging a pull request may close this issue.

2 participants