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

Fixed membership request being added in the user's DB #2582

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

syedali237
Copy link

@syedali237 syedali237 commented Oct 12, 2024

What kind of change does this PR introduce?

BugFix

Issue Number:

Fixes #2242 (Case 1)

Did you add tests for your changes?

No

Snapshots/Videos:

1728724319114819.mp4

If relevant, did you update the documentation?

N/A

Summary

N/A

Does this PR introduce a breaking change?

No

Other information

Working on the remaining two cases but ran into some challenges. This will require multiple PRs.

Have you read the contributing guide?

Summary by CodeRabbit

  • New Features

    • Enhanced logic for sending membership requests, including additional user existence checks.
    • Improved tracking of membership requests to ensure accurate updates.
    • Introduced new input type for filtering action item categories.
  • Bug Fixes

    • Introduced error handling for user update failures to improve robustness.
    • Removed the ability to filter action items by active status.
  • Tests

    • Added unit tests for the membership request handling to validate error scenarios for non-existent users.
  • Chores

    • Updated ESLint configuration for improved structure and readability.
    • Added new dependency for global variable definitions in development.

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

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
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

Copy link

coderabbitai bot commented Oct 12, 2024

Walkthrough

The sendMembershipRequest function in src/resolvers/Mutation/sendMembershipRequest.ts has been modified to improve error handling and logic for managing membership requests. A check for user existence has been added, throwing a NotFoundError if the user is not found. The function now verifies if a membership request already exists in the user's membershipRequests array before adding it. Comments in the code have been updated to reflect these changes, and a new error handling mechanism has been introduced for failed user updates.

Changes

File Change Summary
src/resolvers/Mutation/sendMembershipRequest.ts Enhanced logic and error handling in sendMembershipRequest, including user existence check, membership request validation, and updated comments.
eslint.config.mjs Updated import statement for @graphql-eslint/eslint-plugin, improved structure and readability of ESLint configuration.
package.json Added new dependency "globals": "^15.11.0" to devDependencies.
tests/resolvers/Mutation/checkUserNull.spec.ts Introduced unit tests for sendMembershipRequest, focusing on error handling for non-existent users.
.eslintrc.json Added new TypeScript linting rules, including @typescript-eslint/ban-types.
schema.graphql Removed is_active field from ActionItemWhereInput and added ActionItemCategoryWhereInput.

Assessment against linked issues

Objective Addressed Explanation
Ensure membership requests are added to user's membershipRequests (2242)
Fix fetching issues with organization membershipRequests (2242)
Ensure all previously added requests are fetchable (2242)

Possibly related issues

Possibly related PRs

  • Added the field Identifier #2509: This PR adds a new field identifier to the User type in the GraphQL schema, which is relevant as it enhances user identification, potentially impacting how user data is managed in relation to membership requests.
  • Handle creatorId #2564: This PR modifies the MembershipRequestsWhereInput input type to include new fields related to creatorId, which directly relates to the changes in the main PR that involve user validation and membership request handling.

Suggested reviewers

  • palisadoes

🐰 In the meadow, requests do bloom,
A rabbit's joy dispels the gloom.
With checks in place, both firm and bright,
Memberships now take flight!
Hopping through, we track each call,
In the garden of requests, we stand tall! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (1)
src/resolvers/Mutation/sendMembershipRequest.ts (1)

107-108: Remove Unnecessary Commented-Out Code

The commented-out console.log statement is unnecessary and can clutter the codebase. Removing such code enhances readability and maintains a clean code environment.

Apply this diff to remove the commented-out line:

-        // console.log("Membership request already exists:", membershipRequestExists);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between b677650 and c911769.

📒 Files selected for processing (1)
  • src/resolvers/Mutation/sendMembershipRequest.ts (3 hunks)
🧰 Additional context used

src/resolvers/Mutation/sendMembershipRequest.ts Outdated Show resolved Hide resolved
src/resolvers/Mutation/sendMembershipRequest.ts Outdated Show resolved Hide resolved
src/resolvers/Mutation/sendMembershipRequest.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 12, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 8 lines in your changes missing coverage. Please review.

Project coverage is 98.53%. Comparing base (b677650) to head (c911769).

Files with missing lines Patch % Lines
src/resolvers/Mutation/sendMembershipRequest.ts 66.66% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2582      +/-   ##
===========================================
- Coverage    98.57%   98.53%   -0.05%     
===========================================
  Files          355      355              
  Lines        17996    18015      +19     
  Branches      2400     2404       +4     
===========================================
+ Hits         17740    17751      +11     
- Misses         253      261       +8     
  Partials         3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 12, 2024
@palisadoes
Copy link
Contributor

Please get the code coverage of the patch higher so that it passes the tests.

image

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (4)
tests/resolvers/Mutation/checkUserNull.spec.ts (3)

20-42: LGTM: Comprehensive setup and teardown.

The setup and teardown hooks are well-structured and follow best practices. Creating test data in beforeAll ensures it's available for all tests, and the cleanup in afterAll is crucial for test isolation.

Consider adding error handling in the beforeAll hook to ensure the test environment is properly set up before running tests. For example:

beforeAll(async () => {
  try {
    MONGOOSE_INSTANCE = await connect();
    // ... rest of the setup ...
  } catch (error) {
    console.error('Failed to set up test environment:', error);
    throw error;
  }
});

44-88: LGTM: Well-structured test case with thorough error checking.

The test case effectively covers the scenario where a user is not found when sending a membership request. The mocking of User.findById and the comprehensive error checking are commendable.

Consider the following improvements:

  1. Use expect.assertions(n) at the beginning of the test to ensure all assertions are called.
  2. Consider using a custom matcher for checking error properties to reduce repetition.
  3. The error message check could be more specific to ensure the exact error is thrown.

Here's an example of how you could implement these suggestions:

it(`throws NotFoundError if no user exists with _id === context.userId when sending membership request`, async () => {
  expect.assertions(4); // Ensure all assertions are called

  const args: MutationSendMembershipRequestArgs = {
    organizationId: testOrganization?.id,
  };

  const context = {
    userId: new Types.ObjectId().toString(),
  };

  vi.spyOn(User, "findById").mockResolvedValueOnce(null);

  await expect(sendMembershipRequestResolver?.({}, args, context))
    .rejects.toThrow("User not found");

  await expect(sendMembershipRequestResolver?.({}, args, context))
    .rejects.toMatchObject({
      message: expect.stringMatching(/user not found|user.notFound/i),
      code: expect.any(String),
      param: expect.any(String),
      extensions: expect.objectContaining({
        code: expect.any(String),
        param: expect.any(String),
      }),
    });
});

This approach simplifies the test, makes it more robust, and easier to maintain.


1-88: Overall, excellent test file with room for minor enhancements.

This test file is well-structured and effectively tests an important edge case of the sendMembershipRequest resolver. It follows best practices for unit testing, including proper setup and teardown, mocking of external dependencies, and thorough error checking.

To further improve the test suite:

  1. Consider adding more test cases to cover other scenarios, such as successful membership requests or different types of errors.
  2. Implement parameterized tests if there are multiple similar scenarios to test.
  3. Add comments explaining the purpose of complex setup steps or assertions to improve readability.

Example of a parameterized test:

import { describe, it } from 'vitest';

describe.each([
  { userId: null, expectedError: 'User not found' },
  { userId: 'invalid-id', expectedError: 'Invalid user ID' },
  // Add more scenarios as needed
])('sendMembershipRequest with different user scenarios', ({ userId, expectedError }) => {
  it(`throws error "${expectedError}" for userId: ${userId}`, async () => {
    // Test implementation
  });
});

These enhancements would make the test suite more comprehensive and easier to maintain as the codebase evolves.

src/resolvers/Mutation/sendMembershipRequest.ts (1)

107-120: Approved: Improved consistency in membership request handling

This addition ensures that the user's document is consistent with the existing membership requests. It's a good practice to maintain data integrity across related documents.

However, consider a minor optimization:

Instead of fetching the entire user document earlier and then updating it here, you could combine these operations into a single atomic update:

const updatedUser = await User.findOneAndUpdate(
  { _id: context.userId, membershipRequests: { $ne: membershipRequestExists._id } },
  { $addToSet: { membershipRequests: membershipRequestExists._id } },
  { new: true, runValidators: true }
);

if (!updatedUser) {
  // Handle the case where the user wasn't found or the request was already present
}

This approach would be more efficient and eliminate the need for the separate check and update operations.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c911769 and d674674.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • eslint.config.mjs (1 hunks)
  • package.json (1 hunks)
  • src/resolvers/Mutation/sendMembershipRequest.ts (3 hunks)
  • tests/resolvers/Mutation/checkUserNull.spec.ts (1 hunks)
🧰 Additional context used
📓 Learnings (3)
📓 Common learnings
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-api#2582
File: src/resolvers/Mutation/sendMembershipRequest.ts:156-170
Timestamp: 2024-10-12T09:54:09.642Z
Learning: In the `sendMembershipRequest` mutation within `src/resolvers/Mutation/sendMembershipRequest.ts`, the team prefers not to introduce transactions for simple operations when existing error handling is sufficient, to avoid unnecessary overhead.
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-api#2582
File: src/resolvers/Mutation/sendMembershipRequest.ts:81-87
Timestamp: 2024-10-12T09:51:49.144Z
Learning: Including a null check after `User.findById()` is necessary to ensure the `user` is not `null` before accessing its properties, even if `User.exists()` was used earlier.
src/resolvers/Mutation/sendMembershipRequest.ts (3)
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-api#2582
File: src/resolvers/Mutation/sendMembershipRequest.ts:110-123
Timestamp: 2024-10-12T09:43:54.188Z
Learning: In our codebase, `MembershipRequest.exists()` returns a document with an `_id` field, so accessing `membershipRequestExists._id` is valid.
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-api#2582
File: src/resolvers/Mutation/sendMembershipRequest.ts:156-170
Timestamp: 2024-10-12T09:54:09.642Z
Learning: In the `sendMembershipRequest` mutation within `src/resolvers/Mutation/sendMembershipRequest.ts`, the team prefers not to introduce transactions for simple operations when existing error handling is sufficient, to avoid unnecessary overhead.
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-api#2582
File: src/resolvers/Mutation/sendMembershipRequest.ts:81-87
Timestamp: 2024-10-12T09:51:49.144Z
Learning: Including a null check after `User.findById()` is necessary to ensure the `user` is not `null` before accessing its properties, even if `User.exists()` was used earlier.
tests/resolvers/Mutation/checkUserNull.spec.ts (1)
Learnt from: syedali237
PR: PalisadoesFoundation/talawa-api#2582
File: src/resolvers/Mutation/sendMembershipRequest.ts:81-87
Timestamp: 2024-10-12T09:51:49.144Z
Learning: Including a null check after `User.findById()` is necessary to ensure the `user` is not `null` before accessing its properties, even if `User.exists()` was used earlier.
🔇 Additional comments (12)
tests/resolvers/Mutation/checkUserNull.spec.ts (1)

1-19: LGTM: Imports and declarations are well-structured.

The imports cover all necessary modules, types, and helper functions. The use of nanoid for generating unique names is a good practice. Test variables are correctly typed, which will help catch potential issues early.

eslint.config.mjs (8)

16-17: Approve addition of recommendedConfig to FlatCompat.

The addition of recommendedConfig: js.configs.recommended to the FlatCompat instantiation is a good improvement. It ensures that the recommended ESLint configurations are included, which helps maintain consistent code quality standards across the project.


20-37: Approve restructuring of ESLint configuration.

The restructuring of the ESLint configuration into an array of objects is an excellent improvement. This change enhances readability and maintainability without altering the functionality. It makes it easier to manage different aspects of the configuration separately, which is particularly beneficial for large projects.


51-66: Approve formatting improvements in the rules section.

The reformatting of the rules section enhances readability and consistency. The improved indentation and structure make it easier to understand and maintain the ESLint rules. This change is purely cosmetic and doesn't alter the functionality of the rules, which is a positive improvement.


69-130: Approve improvements to TypeScript-specific configuration.

The restructuring and reformatting of the TypeScript-specific configuration is a significant improvement. It enhances readability and makes the configuration easier to maintain. The naming conventions are now more clearly defined, which will help enforce consistent coding standards across the project. This change is beneficial for long-term maintainability of the codebase.


133-147: Approve updates to GraphQL-specific configuration.

The changes to the GraphQL-specific configuration are well-implemented. The use of the namespace import for the parser (graphqlEslint.parser) is consistent with the earlier import statement modification. The overall structure is now more aligned with the rest of the configuration, which improves consistency and readability.


148-163: Approve formatting improvements to file-specific rules.

The reformatting of file-specific rules enhances the overall consistency and readability of the configuration. These changes maintain the existing functionality while making the configuration easier to read and maintain. This is a positive improvement that aligns with the overall restructuring of the ESLint configuration file.


Line range hint 1-163: Overall assessment: Significant improvement in configuration structure and readability.

The changes made to eslint.config.mjs represent a substantial improvement in the structure and readability of the ESLint configuration. Key points:

  1. The use of namespace imports for plugins enhances flexibility.
  2. The restructuring of the configuration into a more modular format improves maintainability.
  3. Consistent formatting throughout the file makes it easier to read and understand.
  4. No functional changes were introduced, preserving the existing behavior while improving the code quality.

These changes will make it easier for developers to understand, maintain, and extend the ESLint configuration in the future. Great work on improving the developer experience without introducing risk.


11-11: Approve import statement change and verify usage.

The change from default import to namespace import for @graphql-eslint/eslint-plugin is good. It provides more flexibility in accessing the plugin's exports.

Please verify that all usages of this plugin in the configuration have been updated accordingly. Run the following script to check for any remaining usage of the old import style:

✅ Verification successful

Verification Successful: No remaining usage of the old import style found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining usage of the old import style for @graphql-eslint/eslint-plugin

rg --type javascript 'import \w+ from "@graphql-eslint/eslint-plugin"'

Length of output: 107


Script:

#!/bin/bash
# Description: Check for any remaining usage of the old import style for @graphql-eslint/eslint-plugin

rg --type js 'import \w+ from "@graphql-eslint/eslint-plugin"'

Length of output: 64

src/resolvers/Mutation/sendMembershipRequest.ts (2)

81-87: Approved: Additional user validation enhances robustness

This additional null check for the user after retrieval is a good practice. It ensures that the user object is not null before accessing its properties, preventing potential runtime errors. Although there's an earlier User.exists() check, this extra validation adds an important layer of safety, especially considering potential race conditions or inconsistencies in distributed systems.


128-134: Approved: Clear creation of MembershipRequest

The creation of the MembershipRequest document is implemented correctly. The updated comment accurately describes the operation, improving code readability.

package.json (1)

141-141: New devDependency added: "globals"

The globals package has been added as a development dependency with version ^15.11.0. This package is typically used to provide a list of global identifiers for various JavaScript environments, which can be useful for linting and static analysis tools.

While this addition doesn't directly address the PR objectives related to fixing membership request issues, it may be part of an effort to improve code quality and development tooling. However, there are a few points to consider:

  1. The purpose of adding this package is not clear from the PR objectives or the AI-generated summary. It would be helpful to understand the motivation behind this addition.

  2. The globals package is often used in conjunction with ESLint. Given that this project already uses ESLint (as evidenced by the existing ESLint-related dependencies), we should ensure that this addition is intentional and necessary.

  3. The version ^15.11.0 allows for compatible updates. This is generally fine, but it's worth noting that major version changes (if any) might introduce breaking changes in the future.

To ensure this addition doesn't conflict with existing setups and is properly integrated, please run the following checks:

If you need any help integrating this new package with the existing ESLint setup or have any questions about its usage, please let me know.

✅ Verification successful

Addition of "globals" Verified

The globals package has been successfully added to devDependencies in package.json with version ^15.11.0. Additionally, it's being imported in eslint.config.mjs, indicating its use in the ESLint configuration for defining global variables.

No conflicts or issues were found with existing dependencies.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if globals is already a dependency of any existing devDependencies
npm ls globals

# Verify if there are any ESLint configuration files that might need updating
find . -name ".eslintrc*"

# Check for any scripts that might be using the globals package
grep -R "require('globals')" .
grep -R "from 'globals'" .

Length of output: 206


Script:

#!/bin/bash
# Use jq to check if "globals" is listed under devDependencies in package.json
jq '.devDependencies.globals' package.json

# Verify the exact location of "globals" within devDependencies
jq 'paths | select(inpath(["devDependencies"]) and .[-1] == "globals")' package.json

# Search for any usage of "globals" in scripts or configurations without require/import
grep -R '"globals"' .

Length of output: 719

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 14, 2024
@syedali237
Copy link
Author

@palisadoes Patch coverage increased to 100% with the last commit.

Screenshot 2024-10-15 at 5 26 28 PM

Copy link
Author

@syedali237 syedali237 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handled user == null case differently, and changed a few options in eslint.config.mjs

@pranshugupta54
Copy link
Member

Please fix linting, formatting, and type errors

Copy link
Author

@syedali237 syedali237 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can i trigger the coderabbit bot for its stale review?

@pranshugupta54
Copy link
Member

It should automatically do for next commits.

@pranshugupta54
Copy link
Member

@coderabbitai review

@syedali237
Copy link
Author

@pranshugupta54 On running npm run lint:fix, formatting errors are appearing repo-wide, not just in my changes, should we address this separately?

Copy link

coderabbitai bot commented Oct 19, 2024

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pranshugupta54
Copy link
Member

Check the details of failed action - here, you only need to fix these

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
.eslintrc.json (1)

Line range hint 1-124: Consider the impact of strict linting rules on developer productivity

While the ESLint configuration in this file promotes excellent coding practices and type safety, it's worth noting that some rules (including the newly added one) are quite strict. This can lead to improved code quality but might also impact developer productivity, especially for those new to the project.

Consider:

  1. Documenting these linting rules in the project's contributing guidelines.
  2. Providing examples of how to satisfy these rules in the documentation.
  3. Regularly reviewing and adjusting these rules based on team feedback and project needs.

This will help maintain a balance between code quality and developer experience.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4d28fb6 and f4f22db.

📒 Files selected for processing (2)
  • .eslintrc.json (1 hunks)
  • schema.graphql (0 hunks)
💤 Files with no reviewable changes (1)
  • schema.graphql
🧰 Additional context used
🔇 Additional comments (1)
.eslintrc.json (1)

113-113: Excellent addition of the "@typescript-eslint/ban-types" rule!

This rule enhances type safety by prohibiting the use of problematic types such as {}, object, Function, String, Boolean, and Number. It encourages developers to use more specific and appropriate types, leading to improved code quality, better readability, and reduced chances of runtime errors.

The addition of this rule aligns well with the existing strict TypeScript configuration in this file.

@syedali237
Copy link
Author

@pranshugupta54 , this PR got a bit messed up. Should I close this one and raise a new one?

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.

3 participants