elsaland / elsa

❄️ Elsa is a minimal runtime for JavaScript and TypeScript written in Go
MIT License
2.79k stars 61 forks source link

Mandate lint and fmt in CI #85

Closed littledivy closed 3 years ago

vidu171 commented 3 years ago

Hi, I would like to take this up. Can you explain a bit more? What do you mean by mandate?

littledivy commented 3 years ago

@vidu171 Adding checks in the CI for checking gofmt & prettier formatting should do.

vidu171 commented 3 years ago

I would love to start working on this issue.

vidu171 commented 3 years ago

Hi, are there any files that have to be added to .prettierignore?

littledivy commented 3 years ago

No, there is already a .prettierignore https://github.com/elsaland/elsa/blob/master/.prettierignore

sidntrivedi012 commented 3 years ago

Hey @vidu171 👋 , are you still working on this issue? Would love to take it up or maybe help out. Thanks :)

littledivy commented 3 years ago

Feel free to take this up @sidntrivedi012

sidntrivedi012 commented 3 years ago

@littledivy I was thinking if we can use DeepSource Transformers for formatting the code. They support both Gofmt as well as Prettier. Alongwith that, we can also use the Analyzers which will perform the linting and static analysis of the code at every PR in order to maintain code quality.

I added both Gofmt and Prettier transformer and the Go and JS analyzer to my fork. And :

I think it will be a great automation to maintain a single automated code quality and formatting across the project. Please take a look. The procedure to start using it is just adding a deepsource.toml file in the root of the repository. Thanks.