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

adding no-unused-vars rule #2428

Merged
merged 3 commits into from
Nov 17, 2024

Conversation

prayanshchh
Copy link
Contributor

@prayanshchh prayanshchh commented Nov 12, 2024

What kind of change does this PR introduce?
adds no-unused-vars eslint rule in eslintric.json

Issue Number:
#2259
Fixes #

Did you add tests for your changes?
No

Snapshots/Videos:

If relevant, did you update the documentation?
No

Summary
adds no-unuse-vars so that CLI-husky commits and PR's fail on occurence of any unused vars in the changed files.

Does this PR introduce a breaking change?
No

Other information

Have you read the contributing guide?
Yes

Summary by CodeRabbit

  • Chores
    • Added a new ESLint rule to flag unused variables, promoting cleaner code practices.

Copy link
Contributor

coderabbitai bot commented Nov 12, 2024

Walkthrough

The changes in this pull request involve the modification of the ESLint configuration file .eslintrc.json. A new rule, @typescript-eslint/no-unused-vars, has been added with an error level setting. This rule aims to enforce the practice of not allowing declared but unused variables in the codebase, thereby promoting cleaner coding standards. No other modifications to existing rules or configurations were made.

Changes

File Change Summary
.eslintrc.json Added rule @typescript-eslint/no-unused-vars with error level.

Possibly related issues

  • Fix Linting for Submitted PR Files #2259: This issue aims to enforce consistent coding standards through linting, which aligns with the addition of the @typescript-eslint/no-unused-vars rule in this PR.

Possibly related PRs

  • fixed the eslint checker #2318: This PR addresses a bug in the eslint_disable_check.py script related to the @typescript-eslint/no-unused-vars rule, making it directly relevant to the changes in this PR.

Suggested reviewers

  • palisadoes: Suggested for review due to involvement in related linting issues and PRs.

Poem

🐇 In the code, where bunnies play,
Unused vars have lost their way.
A new rule hops in, clear and bright,
To keep our code both clean and right!
Let's code with joy, no vars astray,
With every line, we leap and sway! 🌼


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

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

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.26%. Comparing base (fb913e1) to head (b09a405).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2428   +/-   ##
========================================
  Coverage    98.26%   98.26%           
========================================
  Files          297      297           
  Lines         8638     8638           
  Branches      2514     2518    +4     
========================================
  Hits          8488     8488           
  Misses         139      139           
  Partials        11       11           

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

@prayanshchh prayanshchh marked this pull request as ready for review November 12, 2024 03:59
@prayanshchh prayanshchh marked this pull request as draft November 17, 2024 08:21
@prayanshchh prayanshchh marked this pull request as ready for review November 17, 2024 08:22
@palisadoes palisadoes merged commit 3ea2919 into PalisadoesFoundation:develop Nov 17, 2024
10 of 12 checks passed
@prayanshchh prayanshchh deleted the eslint-rule branch November 18, 2024 02:54
palisadoes added a commit that referenced this pull request Dec 7, 2024
* advertisement and plugin screen

* added revamped design

* fixes added

* fixed testcases

* chore(deps): bump sass from 1.80.6 to 1.80.7 (#2433)

Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.80.6...1.80.7)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (#2434)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (#2435)

Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2.
- [Release notes](https://github.com/mui/mui-x/releases)
- [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md)
- [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts)

---
updated-dependencies:
- dependency-name: "@mui/x-charts"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @types/react from 18.3.3 to 18.3.12 (#2436)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pull-request.yml

* Update dependabot.yaml

* added docker check to workflow (#2414)

* added docker check to workflow

* made recommended changes to docker check in workflow

* added changes to docker check inn workflow as recommended

* added changes

* updated indentation in pull-request.yml file

* updated indentation in pull-request.yml file

* added Dockerfile and Docker-compose.yml file

* added Dockerfile and Docker-compose.yml file

* updated .docker-ignore file

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* properly formatted code

* trying to make docker check pass

* trying to make docker check pass

* updated INSTALLATION.md

* updated INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* updated docker workflow

* updated INSTALLATION.md

* eslint-rule-no_unused_vars (#2428)

* Updated pr template with checklist (#2454)

* Updated pr template with checklist

* Additional changes for the PR template

* Changed the url for the PR template

* refactored addOnStore

* refactored addOnEntry v1

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: Vanshika Sabharwal <[email protected]>
Co-authored-by: prayansh_chhablani <[email protected]>
Co-authored-by: Dhiraj Udhani <[email protected]>
devender18 pushed a commit to devender18/talawa-admin that referenced this pull request Dec 7, 2024
* advertisement and plugin screen

* added revamped design

* fixes added

* fixed testcases

* chore(deps): bump sass from 1.80.6 to 1.80.7 (PalisadoesFoundation#2433)

Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.80.6...1.80.7)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (PalisadoesFoundation#2434)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (PalisadoesFoundation#2435)

Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2.
- [Release notes](https://github.com/mui/mui-x/releases)
- [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md)
- [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts)

---
updated-dependencies:
- dependency-name: "@mui/x-charts"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @types/react from 18.3.3 to 18.3.12 (PalisadoesFoundation#2436)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pull-request.yml

* Update dependabot.yaml

* added docker check to workflow (PalisadoesFoundation#2414)

* added docker check to workflow

* made recommended changes to docker check in workflow

* added changes to docker check inn workflow as recommended

* added changes

* updated indentation in pull-request.yml file

* updated indentation in pull-request.yml file

* added Dockerfile and Docker-compose.yml file

* added Dockerfile and Docker-compose.yml file

* updated .docker-ignore file

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* properly formatted code

* trying to make docker check pass

* trying to make docker check pass

* updated INSTALLATION.md

* updated INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* updated docker workflow

* updated INSTALLATION.md

* eslint-rule-no_unused_vars (PalisadoesFoundation#2428)

* Updated pr template with checklist (PalisadoesFoundation#2454)

* Updated pr template with checklist

* Additional changes for the PR template

* Changed the url for the PR template

* refactored addOnStore

* refactored addOnEntry v1

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: Vanshika Sabharwal <[email protected]>
Co-authored-by: prayansh_chhablani <[email protected]>
Co-authored-by: Dhiraj Udhani <[email protected]>
palisadoes added a commit that referenced this pull request Dec 13, 2024
* refactored OrganizationDashboard css/ closes #2513

* refactor:OrganizationDashboard_css(fixes #2513)

* Plugin and  advertisement screen revamp (#2006)

* advertisement and plugin screen

* added revamped design

* fixes added

* fixed testcases

* chore(deps): bump sass from 1.80.6 to 1.80.7 (#2433)

Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.80.6...1.80.7)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (#2434)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (#2435)

Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2.
- [Release notes](https://github.com/mui/mui-x/releases)
- [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md)
- [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts)

---
updated-dependencies:
- dependency-name: "@mui/x-charts"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @types/react from 18.3.3 to 18.3.12 (#2436)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pull-request.yml

* Update dependabot.yaml

* added docker check to workflow (#2414)

* added docker check to workflow

* made recommended changes to docker check in workflow

* added changes to docker check inn workflow as recommended

* added changes

* updated indentation in pull-request.yml file

* updated indentation in pull-request.yml file

* added Dockerfile and Docker-compose.yml file

* added Dockerfile and Docker-compose.yml file

* updated .docker-ignore file

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* added recommended changes by code rabbit

* properly formatted code

* trying to make docker check pass

* trying to make docker check pass

* updated INSTALLATION.md

* updated INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* added recommended changes to INSTALLATION.md

* updated docker workflow

* updated INSTALLATION.md

* eslint-rule-no_unused_vars (#2428)

* Updated pr template with checklist (#2454)

* Updated pr template with checklist

* Additional changes for the PR template

* Changed the url for the PR template

* refactored addOnStore

* refactored addOnEntry v1

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: Vanshika Sabharwal <[email protected]>
Co-authored-by: prayansh_chhablani <[email protected]>
Co-authored-by: Dhiraj Udhani <[email protected]>

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523) (#2610)

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523)

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523)

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523)

* refactored: CSS files in src/screens/OrgSettings(fixes: #2523)

* Update pull-request.yml

* refactored: CSS files in src/screens/OrganizationDashboard(fixes: #2513)

* refactored: CSS files in src/screens/OrganizationDashboard(fixes: #2513)

* improve import for global css

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Shekhar Patel <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: Vanshika Sabharwal <[email protected]>
Co-authored-by: prayansh_chhablani <[email protected]>
Co-authored-by: Dhiraj Udhani <[email protected]>
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.

2 participants