benetherington / node-TOM-discord-bot

MIT License
2 stars 0 forks source link

Tech/add linters #31

Closed fonji closed 2 years ago

fonji commented 2 years ago
fonji commented 2 years ago

@benetherington here's a little welcome back from holidays gift :gift:

benetherington commented 2 years ago

😍

Oh, this is lovely, thank you. I'm almost done with what I'm working on right now, I should be able to take a look at this in the next two days.

BTW, I'm very proud of what I'm working on right now. benetherington/salvage-search. I just did a GIANT rewrite that includes what I consider some very pretty handwritten frontend work. Pretty for me, anyway. :) The project is totally useless to almost everyone who doesn't work on the crash study that is my day job. For us, though, this thing is kinda blissful. :)

fonji commented 2 years ago

Cool! Once this is merged, I'll add a tool that automatically lints files on each commit. So you won't even have to think about it.

I'll have a look at your other project :grin:

benetherington commented 2 years ago

I'm excited for automated linting, thank you. I'd appreciate more info. I didn't know you could configure git to run scripts, or is this a github action?

fonji commented 2 years ago

Not on github, it's local. It's called git hooks.

The tool I'll set up is husky. An alternative I use for ruby (but works for most languages) is overcommit.

Here's documentations about hooks, no need to read them all, just pick one that suits you :smiley: https://git-scm.com/docs/githooks https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks https://githooks.com/ https://www.geeksforgeeks.org/git-hooks/ (warning big "pliz sign up" modal, at least there's a :x: on top to close it) https://www.hostinger.com/tutorials/how-to-use-git-hooks/ (warning the cookie banner takes half the page)

For longer term follow up, you can set up codeclimate on your open source projects