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

Improve and Standardize Automated Linting Tests #1310

Merged

Conversation

KrutikaBhatt
Copy link
Contributor

What kind of change does this PR introduce? - This PR introduces new linting rules to improve and automate the linting tests. The following rules are added :

  1. Naming Convention :

    • Using PascalCase for type names.
    • Using PascalCase for enum values.
    • Using PascalCase for types
    • Parameters, Variables and functions are CamelCase
    • Use _ as a prefix for private properties.
  2. Array Type

  3. consistent-type-assertions

  4. consistent-type-imports

  5. explicit-function-return-type

  6. typedef

Issue Number: #1275

Fixes #1275

Did you add tests for your changes? Yes

Does this PR introduce a breaking change? No

Have you read the contributing guide? Yes

@github-actions
Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

@KrutikaBhatt
Copy link
Contributor Author

I opened this PR early. Please give a look at these additional rules. Once they are approved, I will resolve the warnings and clean the code. We can also introduce new rules

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #1310 (77b40c6) into develop (68e6f74) will decrease coverage by 0.21%.
The diff coverage is 97.81%.

@@             Coverage Diff             @@
##           develop    #1310      +/-   ##
===========================================
- Coverage    99.59%   99.39%   -0.21%     
===========================================
  Files          177      171       -6     
  Lines        10166    10036     -130     
  Branches       753      750       -3     
===========================================
- Hits         10125     9975     -150     
- Misses          41       51      +10     
- Partials         0       10      +10     
Impacted Files Coverage Δ
src/resolvers/Mutation/updatePost.ts 97.64% <71.42%> (-2.36%) ⬇️
src/resolvers/Mutation/updateEvent.ts 97.24% <72.72%> (-2.76%) ⬇️
src/resolvers/Mutation/createUserTag.ts 99.07% <75.00%> (-0.93%) ⬇️
src/resolvers/Mutation/createEvent.ts 98.24% <76.92%> (-1.76%) ⬇️
src/resolvers/Mutation/togglePostPin.ts 99.13% <80.00%> (-0.87%) ⬇️
src/resolvers/Mutation/updateUserProfile.ts 90.80% <80.00%> (-9.20%) ⬇️
src/resolvers/Mutation/login.ts 99.00% <83.33%> (-1.00%) ⬇️
src/resolvers/Mutation/removeMember.ts 99.32% <90.00%> (-0.68%) ⬇️
src/directives/authDirective.ts 100.00% <100.00%> (ø)
src/directives/roleDirective.ts 100.00% <100.00%> (ø)
... and 159 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@palisadoes
Copy link
Contributor

These changes are OK. Should this PR be merged?

@KrutikaBhatt
Copy link
Contributor Author

Sir, I will make the changes in the codebase with respect to the newly added linting rules; the we can get the PR merged

@palisadoes
Copy link
Contributor

Please add the additional code files to this PR

@palisadoes
Copy link
Contributor

Is this ready for review now?

@KrutikaBhatt
Copy link
Contributor Author

Almost done sir

@palisadoes palisadoes requested a review from xoldd April 24, 2023 21:38
@palisadoes
Copy link
Contributor

Please fix the conflicting files

@palisadoes
Copy link
Contributor

Is this ready for review now?

@KrutikaBhatt
Copy link
Contributor Author

Yes sir, the PR is ready for review

@KrutikaBhatt
Copy link
Contributor Author

Sorry for a late response but there were a lot of errors generated after applying rules and some errors where difficult to solve

@palisadoes
Copy link
Contributor

They are still failing. Can you figure out why?

@KrutikaBhatt
Copy link
Contributor Author

We have changes in eslint.json file which is an anauthorized file. Because of this 'checking workflow files' fail and codecov does not generate the report. Rest all PR checks all passed

@palisadoes palisadoes merged commit 68ea63e into PalisadoesFoundation:develop Apr 28, 2023
@palisadoes palisadoes mentioned this pull request Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve and Standardize Automated Linting Tests
2 participants