cucumber-js icon indicating copy to clipboard operation
cucumber-js copied to clipboard

Replace uses of `any` type with the proper type

Open mattwynne opened this issue 3 years ago • 5 comments

When we converted cucumber-js from JavaScript to TypeScript, we used the any type quite liberally to hasten the process.

We have a long-term goal to replace all instances of any with the suitable type.

This would make a great first-timer contribution to potter around in the code and get to know it. As always, you can find the commiters in the https://cucumber.io/community#slack if you need any guidance.

This could be solved by multiple small pull requests. Even a PR fixing a single use of any would be welcome!

mattwynne avatar Apr 21 '21 14:04 mattwynne

Hi 👋🏽

I would love to take on small chunks of this effort if I may as a new contributor to this repo! May I do so?

mannyistyping avatar Aug 06 '22 20:08 mannyistyping

Hey @mannyistypingonacomputer - yes please go ahead! Small chunks are good, and let me know if you need any pointers.

davidjgoss avatar Aug 07 '22 08:08 davidjgoss

Hi @davidjgoss 👋🏽

Thank you for the quick response, confirmation, and offer for points should I need any! :) I will take you up on that offer should I get blocked on anything 👍🏽

mannyistyping avatar Aug 07 '22 18:08 mannyistyping

Is this issues still valid? Can I contribute, even in small chunks? I'm going to need some pointers to start looking into codebase :)

piemme avatar Apr 05 '24 07:04 piemme

Hi @piemme, thanks for volunteering and yes it's still valid.

A good way to get started on this would be:

  1. Fork and clone the repository
  2. In the .eslintrc.yml, change the value of @typescript-eslint/no-explicit-any from off to 2 to enable the relevant lint rule
  3. Run npm run lint-code

This yields 105 errors at time of writing. Many of these will be similar themes (e.g. any is used a lot to type user-authored code, maybe we can improve on that) and some will be trickier than others, but any progress is good. I'm happy to answer any contextual questions here on the issue or in Slack.

davidjgoss avatar Apr 06 '24 20:04 davidjgoss