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

QA: Add a code formatter and code linter for standardizing the code style #174

Open
Rahulm2310 opened this issue Feb 11, 2021 · 14 comments · May be fixed by #281
Open

QA: Add a code formatter and code linter for standardizing the code style #174

Rahulm2310 opened this issue Feb 11, 2021 · 14 comments · May be fixed by #281
Assignees
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Category: Quality Assurance Changes to code or files that improve testing or fixes bugs. Type: Maintenance Repository maintenance.

Comments

@Rahulm2310
Copy link
Contributor

Rahulm2310 commented Feb 11, 2021

Is your feature request related to a problem? Please describe.
It will be difficult to enforce a coding style as the repo grows bigger and gets more PRs.

Describe the solution you'd like
We must use a code formatter (ideally, opinionated one like https://prettier.io/) and a code linter (like https://eslint.org/) to enhance code quality and maintain consistency.

@Rahulm2310
Copy link
Contributor Author

Rahulm2310 commented Feb 11, 2021

@mtreacy002 @isabelcosta Is this valid? If yes, I would like to work on this. Thanks 🙂

@Rahulm2310 Rahulm2310 changed the title Use a code formatter for standardizing the code style Add a code formatter and code linter for standardizing the code style Feb 14, 2021
@Rahulm2310 Rahulm2310 changed the title Add a code formatter and code linter for standardizing the code style Add a code formatter for standardizing the code style Feb 14, 2021
@Rahulm2310 Rahulm2310 changed the title Add a code formatter for standardizing the code style Add a code formatter and code linter for standardizing the code style Feb 14, 2021
@mtreacy002
Copy link
Member

@Rahulm2310 . I think this is a valid issue. Can you please tell me which of the 2 you mentioned above you're going to use? Can you please share your insight on pros and cons on both options here? Thanks

@Rahulm2310
Copy link
Contributor Author

image

@mtreacy002 We can use integrate both of them to get the best results (a new trend). Prettier also provides a guide to integrate with eslint.

@mtreacy002
Copy link
Member

mtreacy002 commented Feb 16, 2021

Sounds good to me (to integrate both), @Rahulm2310 . The next question is, how and when will we apply the linters? Can they be added to the CI build (currently we're using Travis but soon moving to Github action) which is an ideal way so no need for manual linting.

@Rahulm2310
Copy link
Contributor Author

Yes @mtreacy002 . Both of these can be added to Github Actions to avoid manual linting. But should we put this on hold till we use Travis ?

@mtreacy002
Copy link
Member

Definitely, @Rahulm2310. In fact, we're moving to Github Actions, so once #170 approved and merged, you can work on this issue and add the linters as GitHub workflow 😉

@mtreacy002 mtreacy002 added Category: Coding Changes to code base or refactored code that doesn't fix a bug. Category: Quality Assurance Changes to code or files that improve testing or fixes bugs. Status: On Hold Issue or PR needs more info, a discussion, a review or approval from a Maintainer/Code Owner. Type: Maintenance Repository maintenance. labels Feb 17, 2021
@Rahulm2310
Copy link
Contributor Author

Sure. Thanks @mtreacy002 😉

@mtreacy002 mtreacy002 changed the title Add a code formatter and code linter for standardizing the code style QA: Add a code formatter and code linter for standardizing the code style Feb 28, 2021
@mtreacy002
Copy link
Member

@Rahulm2310 , I forgot that there's a black linter issue that will address this as part of github workfkow. I'll close this issue now to avoid duplication 😉

@Rahulm2310
Copy link
Contributor Author

@mtreacy002 Isn't that for backend? We need a linter for frontend as well

@mtreacy002
Copy link
Member

Oops, you're right, @Rahulm2310 . Sorry for the confusion. Reopening this again 😊.

@mtreacy002 mtreacy002 reopened this Apr 5, 2021
@mtreacy002 mtreacy002 added Status: Available Issue was approved and available to claim or abandoned for over 3 days. and removed Status: On Hold Issue or PR needs more info, a discussion, a review or approval from a Maintainer/Code Owner. labels Jul 30, 2021
@satyaarthchhabra
Copy link

hi @Mtreacy . can i work on this issue

@vj-codes
Copy link
Member

@satyaarthchhabra hey are you still interested to work on this?

@ritik307
Copy link

ritik307 commented Jan 1, 2022

@vj-codes I would like yo work on this issue

@vj-codes
Copy link
Member

vj-codes commented Jan 1, 2022

Assigning you @ritik307
Happy coding!

@vj-codes vj-codes removed the Status: Available Issue was approved and available to claim or abandoned for over 3 days. label Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Category: Quality Assurance Changes to code or files that improve testing or fixes bugs. Type: Maintenance Repository maintenance.
Projects
None yet
5 participants