jdev082 / freecat

The FreeCat Web Browser
Other
5 stars 5 forks source link

Set up Prettier (and maybe eslint) #37

Closed webdev03 closed 2 years ago

webdev03 commented 2 years ago

Prettier will make the code look consistent and we can enforce semicolons or double/one quote(s) and it will make a much more even codebase. Also, when you format the file, less merge conflicts will happen. ESLint, if you really want to be strict, will allow us to enforce the Prettier rules to make a much more even codebase. I can try to make this if you would like.

webdev03 commented 2 years ago

(by the way, this can be a dev dependency, so I don't think it will impact the size of production builds)

hello-smile6 commented 2 years ago

Sounds like a good idea, could I help? And could a test script (and maybe automatic corrections using GitHub Actions) be added?

webdev03 commented 2 years ago

Test script, I have a bit of experience with jest...

hello-smile6 commented 2 years ago

Test script, I have a bit of experience with jest...

Okay, want to work on it on a fork?

webdev03 commented 2 years ago

If we're going this route, we could just implement TypeScript but I don't do much Electron development, so I don't know if that is possible.

hello-smile6 commented 2 years ago

If we're going this route, we could just implement TypeScript but I don't do much Electron development, so I don't know if that is possible.

I tried TypeScript once. It's too hard to configure, and takes a lot of time to compile. Tests could likely accomplish the same goal.

webdev03 commented 2 years ago

I tried TypeScript once. It's too hard to configure, and takes a lot of time to compile. Tests could likely accomplish the same goal.

I use typescript for my project and it works well, let's not get too offtopic.

If you don't know prettier there is https://prettier.io/ which can give some basic instructions.

hello-smile6 commented 2 years ago

I tried TypeScript once. It's too hard to configure, and takes a lot of time to compile. Tests could likely accomplish the same goal.

I use typescript for my project and it works well, let's not get too offtopic.

If you don't know prettier there is https://prettier.io/ which can give some basic instructions.

Okay, I'll give you access to my fork and we can work on it.

webdev03 commented 2 years ago

Okay, I'll give you access to my fork and we can work on it.

I'm not giving my IP address, why do you want it?

hello-smile6 commented 2 years ago

Okay, I'll give you access to my fork and we can work on it.

I'm not giving my IP address, why do you want it?

I don't want it. Just use pull requests instead, then.

hello-smile6 commented 2 years ago

Okay, I'll give you access to my fork and we can work on it.

I'm not giving my IP address, why do you want it?

I wish there was a way to disable that.

jdev082 commented 2 years ago

what...?

jdev082 commented 2 years ago

bloat = bad

hello-smile6 commented 2 years ago

bloat = bad

It won't make the repo bigger.

webdev03 commented 2 years ago

Bloat? It will make it easier for newcomers to come as there isn't going to be, let's say, some people loving function syntax while others like the new Arrow functions. @JaydenDev please rethink this.

hello-smile6 commented 2 years ago

Bloat? It will make it easier for newcomers to come as there isn't going to be, let's say, some people loving function syntax while others like the new Arrow functions. @JaydenDev please rethink this.

Please!

webdev03 commented 2 years ago

You know, I'll fork it myself and do it.

hello-smile6 commented 2 years ago

You know, I'll fork it myself and do it.

I'll just contribute on your fork from now on.

webdev03 commented 2 years ago

I did it.

jdev082 commented 2 years ago

This PR is too big for more precise reviewing to make sure no bad code

webdev03 commented 2 years ago

It is formatted, you can check it, all I did was add prettier and format all the code.

webdev03 commented 2 years ago

Thanks 😄