PalisadoesFoundation / talawa-admin

Admin portal for the Talawa Mobile App. Click on the link below to see our documentation
https://docs.talawa.io/
GNU General Public License v3.0
146 stars 599 forks source link

Fix Linting for Submitted PR Files #2259

Open palisadoes opened 2 months ago

palisadoes commented 2 months ago

Describe the bug

  1. We want to have consistent coding standards for our repositories.
  2. To do this we added linting to our automated processes.
  3. On certain conditions husky commits and files committed to PRs should fail if the linting fails.
  4. These issues were created to fix this:
    1. https://github.com/PalisadoesFoundation/talawa-admin/issues/1427
    2. https://github.com/PalisadoesFoundation/talawa-admin/issues/1270
    3. https://github.com/PalisadoesFoundation/talawa-admin/issues/861
  5. We need the linting rules to be tightened for each commit and PR

To Reproduce Steps to reproduce the behavior:

  1. Start the server
  2. Linting messages occur

We don't need the messages on starting the server to be eliminated. We just need to make sure that code committed to the code base in PRs does not have these linting issues. Eventually the linting messages will go away as the code base is improved.

Expected behavior

  1. CLI Husky commits must fail if any of these eslint conditions are present in the committed code:
    1. react/destructuring-assignment
    2. @typescript-eslint/explicit-module-boundary-types
    3. @typescript-eslint/no-explicit-any
    4. @typescript-eslint/no-non-null-assertion
    5. @typescript-eslint/no-unused-vars
  2. PRs must fail if any of these eslint conditions are present in the committed code:
    1. react/destructuring-assignment
    2. @typescript-eslint/explicit-module-boundary-types
    3. @typescript-eslint/no-explicit-any
    4. @typescript-eslint/no-non-null-assertion
    5. @typescript-eslint/no-unused-vars

Actual behavior

Screenshots

When starting the Admin server, we get these linting errors.

image

Additional details Add any other context or screenshots about the feature request here.

Potential internship candidates Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359

github-actions[bot] commented 1 month ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

Abhinav232004 commented 1 month ago

@palisadoes ,Could you please assign me this issue?

github-actions[bot] commented 1 month ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

palisadoes commented 1 month ago

Unassigning. inactivity

Abhinav232004 commented 1 month ago

I was working on it. Could you please assign this issue to me again?

github-actions[bot] commented 3 weeks ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

palisadoes commented 2 weeks ago

unassigning. inactivity

prayanshchh commented 2 weeks ago

I would like to work on this issue

prayanshchh commented 2 weeks ago

I will start my work on this in 3-4 days as festive season is going on

prayanshchh commented 1 week ago

do i only need to add "@typescript-eslint/no-unused-vars": "error" in .eslintrc.json to solve this issue, as in pull-request.yml we already have: run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py and in .husky/pre-commit npm run lint-staged so we already have checks for linting as well as lint-staged, Is there something more to do here?

palisadoes commented 5 days ago

Are all the cases listed in the original issue handled?

palisadoes commented 5 days ago

During the week of November 11, 2024 we will start a code freeze on the develop branches in Talawa, Talawa Admin and Talawa-API.

We have completed a project to convert the Talawa-API backend to use PostgreSQL. Work will then begin with us merging code in the develop branches to a new develop-postrgres branch in each repository.

Planning activities for this will be managed in our #talawa-projects slack channel. A GitHub project will be created to track specially labeled issues. We completed a similar exercise last year using a similar methodology.

Starting November 12, California time no new PRs will be accepted against the develop branch. They must be applied to the develop-postrgres branch.

There are some GSoC project features that will need to be merged into develop. These will be the only exceptions.

This activity and the post GSoC 2024 start date was announced in our #general Slack channel last month as a pinned post.

prayanshchh commented 5 days ago

Are all the cases listed in the original issue handled?

except this rule: @typescript-eslint/no-unused-vars, everything is implemented

palisadoes commented 4 days ago

Thanks. Please implement that one

prayanshchh commented 4 days ago

alright sir