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

🐛 Bug: When selecting option "Remove type annotations that don't change the meaning of code", it will turn into "Add missing property declarations to classe" #1486

Open
3 tasks done
rubiesonthesky opened this issue Mar 30, 2024 · 5 comments
Labels
area: cli Related to the command line (CLI) status: blocked Waiting for something else to be resolved 🙅 type: bug Something isn't working :( 🐛

Comments

@rubiesonthesky
Copy link
Collaborator

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

Selecting option "Remove type annotations that don't change the meaning of code" for "Which improvements would you like to make?" would stay as "Remove type annotations"

Actual

Selecting option "Remove type annotations that don't change the meaning of code" for "Which improvements would you like to make?", turns into "Add missing property declarations to classes". I'm not sure if this is what is supposed to happen?

✔ What are you trying to accomplish? · Improve typings in my TypeScript files
✔ Where is your tsconfig.json? · tsconfig.json
✔ Which improvements would you like to make? · Add missing property declarations to classes
? Which glob matches files you'd like to convert? … 
  everything in my tsconfig.json
  lib/**/*.{ts,tsx}
  src/**/*.{ts,tsx}
❯ other

Additional Info

Typestat: v0.7.3
node: v20.12.0'

I'm running the tool in this repository

@rubiesonthesky rubiesonthesky added the type: bug Something isn't working :( 🐛 label Mar 30, 2024
@rubiesonthesky
Copy link
Collaborator Author

This is user error... I realized when reading the code and what is different. This question is multi select where other questions are not. It's not indicated in any way. For me it was logical that I move with arrow keys and select with enter like in other question. But here, you actually need to use space to toggle the option on / off.

I wonder would it help, that nothing would be selected by default. Then you would not just press enter and expect the same thing happen. Also, it would be nice to have some other indication in text that you can select multiple!

@rubiesonthesky rubiesonthesky added the area: cli Related to the command line (CLI) label Mar 30, 2024
@JoshuaKGoldberg
Copy link
Owner

Yeah that CLI is pretty old. It'd be great to clean it up! I like your suggestions. 🙂

@JoshuaKGoldberg JoshuaKGoldberg added the status: accepting prs Please, send a pull request to resolve this! 🙏 label Mar 30, 2024
@rubiesonthesky
Copy link
Collaborator Author

@JoshuaKGoldberg If I would look into bigger improvements to cli area, do you have some preference what libraries should be used? I noticed that many are using parseArgs from node:utils now. Or is it preferable continue using commander?

I do not have much experience with node cli libraries, but I really enjoy creating them with Rust. :D

That said, it may be better to hold bigger changes until #1341 has been done? I wonder, would it play nicely if cli was it's own "package", though there is not much code for it.

@JoshuaKGoldberg
Copy link
Owner

For parsing libraries: I'd say node:utils yeah. No need to dip into userland libraries when the platform does it for us!

+1 to waiting until #1341 is done.

@JoshuaKGoldberg JoshuaKGoldberg added status: blocked Waiting for something else to be resolved 🙅 and removed status: accepting prs Please, send a pull request to resolve this! 🙏 labels Apr 1, 2024
@rubiesonthesky
Copy link
Collaborator Author

rubiesonthesky commented Apr 2, 2024

I'll look into fixing that one prompt to be better in some point. I’m having difficulties with every time I try to run the tool :D

further cli changes are blocked by the other task. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cli Related to the command line (CLI) status: blocked Waiting for something else to be resolved 🙅 type: bug Something isn't working :( 🐛
Projects
None yet
Development

No branches or pull requests

2 participants