probe-rs / vscode

VSCode debug extension for probe-rs. It uses the MS DAP protocol to communicate directly with the probe (via probe-rs), and supports basic command line debugging in addition to VSCode UI.
https://probe.rs/
Other
65 stars 6 forks source link

Sourcecode cleanup #20

Closed dbrgn closed 1 year ago

dbrgn commented 2 years ago

Would you object to a PR that introduces prettier and eslint to the codebase? Right now it's a bit of a mess due to no consistent code style (probably because it's based on a plugin template) πŸ™‚

dbrgn commented 2 years ago

Oops, I forgot to tag the current authors @noppej and @Tiwalun...

Yatekii commented 2 years ago

Yep, we already discussed this in #16. We would love to have this :)

I am not that familiar with linter in JS/TS, basically all I used in templates from vue/React was kinda terrible. So if you know how to set it up that would be awesome.

Tbh I am not even sure how much we actually have to change in the extension itself, but a formatter is always nice :)

dbrgn commented 2 years ago

Prettier + eslint + a very strict tsconfig is pretty nice if you want to ensure a clean codebase.

I'll try to come up with a PR, but can't promise any TOA yet πŸ™‚ Feel free to ping me if I should forget about this.

noppej commented 2 years ago

I think it would be great to enforce some standard here, so please feel free to add it if you have the time :)

Tiwalun commented 2 years ago

Not at all, I was planning to do the same.

Consistent formatting would be greatπŸ‘

noppej commented 2 years ago

My Typescript skills are 'lite', so any PR's for better formatting, or more extensive improvements, will be appreciated.

dbrgn commented 2 years ago

Ahh, I totally forgot about this. Maybe I can tackle this issue tonight.

noppej commented 2 years ago

Awesome :) FYI ... there is a PR #31 that is waiting for review, but I'm guessing we should be able to merge your work into that with reasonable ease.

dbrgn commented 2 years ago

Hmm, I was busy with other things today, I'll take a note to do it later this week.

dbrgn commented 2 years ago

Slightly related, is there a specific reason why you're using yarn instead of just going with npm? It's one more dependency that's needed compared to just a plain NodeJS installation.

noppej commented 2 years ago

Ignorance? LOL. I was new to extensions and followed instructions / examples from the docs ... https://code.visualstudio.com/api/extension-guides/debugger-extension#development-setup-for-mock-debug

If you can achieve the same functionality with one less dependency, then I'm open to being educated :)