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

Enable ESLint Rule for Unused Variables to Improve Code Quality #1441

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lamcodeofpwnosec
Copy link

Description of Changes

This pull request enhances code quality by enabling the @typescript-eslint/no-unused-vars rule in the .eslintrc.js configuration file. The rule was previously disabled, which allowed unused variables to remain undetected in the codebase.

Main Changes

  1. Enabled @typescript-eslint/no-unused-vars Rule
    • Change: The rule has been updated from 'off' to 'warn'.
    • Purpose: To warn developers about unused variables, helping maintain clean and efficient code.

Reason for Changes

  • Activating this rule will assist in identifying and removing variables that are declared but never used, which can:
    • Improve readability and maintainability of the code.
    • Prevent potential bugs or confusion caused by leftover, unused variables.
  • This change allows developers to gradually address these warnings without halting the development process, as the rule is set to 'warn' rather than 'error'.

Detailed Changes

  • Before: '@typescript-eslint/no-unused-vars': 'off'
  • After: '@typescript-eslint/no-unused-vars': 'warn'

The goal is to maintain a cleaner codebase and ensure that all declared variables are actively used. Feel free to review and share any feedback or suggestions for further improvements.


@cb-heimdall
Copy link
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@cb-jake
Copy link
Contributor

cb-jake commented Nov 7, 2024

Hello @lamcodeofpwnosec thanks for the PR. We're currently debating migrating the repo to biome for formatting and linting. Going to close this as it wont be relevant when we make the switch. Thanks again.

Myshelle1

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants