Skip to content

[code-scanning-fix] Fix js/unused-local-variable: Remove unused TSESTree import#46173

Merged
pelikhan merged 1 commit into
mainfrom
fix/codeql-645-unused-tsestreetree-import-17ab9a8b8373e2ee
Jul 17, 2026
Merged

[code-scanning-fix] Fix js/unused-local-variable: Remove unused TSESTree import#46173
pelikhan merged 1 commit into
mainfrom
fix/codeql-645-unused-tsestreetree-import-17ab9a8b8373e2ee

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the unused TSESTree import from eslint-factory/src/rules/require-fs-sync-try-catch.ts, fixing a js/unused-local-variable code scanning alert.

Changes

File Change
eslint-factory/src/rules/require-fs-sync-try-catch.ts Remove unused TSESTree named import from @typescript-eslint/utils

Details

TSESTree was imported alongside ESLintUtils but never referenced in the file. Only ESLintUtils is needed. This is a no-op change that does not affect runtime behaviour or ESLint rule logic.

Motivation

Fixes a GitHub code scanning (js/unused-local-variable) alert raised for this file.

Generated by PR Description Updater for #46173 · 23.6 AIC · ⌖ 4.34 AIC · ⊞ 4.7K ·

Resolves CodeQL alert #645 (js/unused-local-variable).
TSESTree was imported but never referenced in the rule implementation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review July 17, 2026 08:16
Copilot AI review requested due to automatic review settings July 17, 2026 08:16
@pelikhan
pelikhan merged commit 56c7633 into main Jul 17, 2026
5 checks passed
@pelikhan
pelikhan deleted the fix/codeql-645-unused-tsestreetree-import-17ab9a8b8373e2ee branch July 17, 2026 08:16
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. This PR only modifies a TypeScript source file (eslint-factory/src/rules/require-fs-sync-try-catch.ts) to remove an unused import. Test Quality Sentinel analysis is not applicable.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #46173 does not have the 'implementation' label and has 0 new lines of code in business logic directories (threshold: 100).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes an unused TypeScript ESLint import flagged by CodeQL.

Changes:

  • Removed the unused TSESTree import.
  • Preserved rule behavior.
Show a summary per file
File Description
eslint-factory/src/rules/require-fs-sync-try-catch.ts Removes the unused import.

Review details

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct and minimal fix. Removing the unused TSESTree import is safe — it is not referenced anywhere in the file, and the remaining import (ESLintUtils) is still used. No behavior change, no regression risk.

🔎 Code quality review by PR Code Quality Reviewer · 9.32 AIC · ⌖ 4.26 AIC · ⊞ 5.6K
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /diagnosing-bugs — change is correct and complete.

This is a clean, minimal fix: the unused TSESTree import is removed and nothing else changes. TypeScript will confirm correctness at compile time. No actionable issues found.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 12.6 AIC · ⌖ 4.27 AIC · ⊞ 6.7K
Comment /matt to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LGTM. The change correctly removes the unused TSESTree named import while keeping ESLintUtils. One-line, no behaviour change, no issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · 11.6 AIC · ⌖ 4.25 AIC · ⊞ 5K

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.

2 participants