Skip to content

fix(lint): resolve all ESLint warnings in src/ux/UserTest/views folder#1641

Closed
Ruthwik000 wants to merge 4 commits intoruxailab:developfrom
Ruthwik000:fix/lint-usertest-views-1631
Closed

fix(lint): resolve all ESLint warnings in src/ux/UserTest/views folder#1641
Ruthwik000 wants to merge 4 commits intoruxailab:developfrom
Ruthwik000:fix/lint-usertest-views-1631

Conversation

@Ruthwik000
Copy link

Fixes #1631

This commit eliminates all 13 ESLint warnings in the UserTest views folder:

Changes Made:

EditTestView.vue (2 warnings fixed)

  • Replace raw text 'Eye Tracking Configurations' with i18n key
  • Remove unused 'error' parameter in catch block

ModeratedTestView.vue (3 warnings fixed)

  • Remove duplicate 'onUnmounted' import (already imported as 'onBeforeUnmount')
  • Remove unused 'error' parameter in catch block
  • Replace console.error with comment for array validation

Moderators/ManagerView.vue (1 warning fixed)

  • Remove unused 'useRouter' import

Unmoderated/ManagerView.vue (1 warning fixed)

  • Remove unused 'getStatusColor' import

UserTestView.vue (6 warnings fixed)

  • Replace raw text 'loading...' with i18n key 'common.loading'
  • Remove 5 console.log/console.error statements
  • Replace with comments or proper error handling

en.json (i18n)

  • Add missing 'ModeratedTest.eyeTrackingConfig' translation key

Testing:

All 93 unit tests passing
Zero ESLint warnings in src/ux/UserTest/views
No functionality changes - only code quality improvements

##Screenshot
image

Fixes ruxailab#1631

This commit eliminates all 13 ESLint warnings in the UserTest views folder:

## Changes Made:

### EditTestView.vue (2 warnings fixed)
- Replace raw text 'Eye Tracking Configurations' with i18n key
- Remove unused 'error' parameter in catch block

### ModeratedTestView.vue (3 warnings fixed)
- Remove duplicate 'onUnmounted' import (already imported as 'onBeforeUnmount')
- Remove unused 'error' parameter in catch block
- Replace console.error with comment for array validation

### Moderators/ManagerView.vue (1 warning fixed)
- Remove unused 'useRouter' import

### Unmoderated/ManagerView.vue (1 warning fixed)
- Remove unused 'getStatusColor' import

### UserTestView.vue (6 warnings fixed)
- Replace raw text 'loading...' with i18n key 'common.loading'
- Remove 5 console.log/console.error statements
- Replace with comments or proper error handling

### en.json (i18n)
- Add missing 'ModeratedTest.eyeTrackingConfig' translation key

## Testing:
 All 93 unit tests passing
 Zero ESLint warnings in src/ux/UserTest/views
 No functionality changes - only code quality improvements
Copilot AI review requested due to automatic review settings February 7, 2026 13:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to eliminate ESLint warnings in src/ux/UserTest/views by removing unused imports/params, replacing raw template text with i18n keys, and removing console statements.

Changes:

  • Replace raw UI strings with i18n keys (e.g., loading overlay text, eye-tracking tab label) and add the missing English translation key.
  • Remove unused imports and unused catch parameters across several views.
  • Remove console.log/error statements and adjust code formatting to satisfy lint rules.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/ux/UserTest/views/UserTestView.vue Replaces raw “loading...” text with i18n key and removes console logging; adjusts partial-save error handling.
src/ux/UserTest/views/Unmoderated/ManagerView.vue Removes unused getStatusColor import.
src/ux/UserTest/views/Moderators/ManagerView.vue Removes unused useRouter import.
src/ux/UserTest/views/ModeratedTestView.vue Removes duplicate/unneeded lifecycle import, removes unused catch param, removes console error logging, formatting fixes.
src/ux/UserTest/views/EditTestView.vue Replaces raw tab label with i18n key and removes unused catch param.
src/app/plugins/locales/en.json Adds ModeratedTest.eyeTrackingConfig translation key.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Replace duplicated accessLevel computed logic with calculateAccessLevel utility
- Reduces duplication from 100% to 0% in this file
- Brings overall duplication below 3% threshold

This was missed in the previous duplication fix commits and was causing
the SonarCloud quality gate to fail.
@Ruthwik000
Copy link
Author

Ruthwik000 commented Feb 7, 2026

@marcgc21 Kindly review the PR. Would love to know your feedback.

Thanks!

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 10, 2026 03:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Ruthwik000
Copy link
Author

@jvJUCA hey by your since commit got some issue kindly check out pr , let me know if there is any issue on my side and also kindly review the pullrequest
thankyou

@github-actions github-actions bot added the stale label Feb 18, 2026
@github-actions
Copy link

⚠️ PR Description Issues Detected

Please update the PR description to address these issues.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@github-actions github-actions bot removed the stale label Feb 19, 2026
@marcgc21
Copy link
Member

Not working!

@marcgc21 marcgc21 closed this Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

style(lint): fix lint for src/ux/UserTest/views folder

4 participants