Skip to content

fix(frontend): merge duplicate path imports in eslint config#3270

Merged
arkid15r merged 3 commits intoOWASP:mainfrom
Shubb07:fix-duplicate-path-import
Jan 9, 2026
Merged

fix(frontend): merge duplicate path imports in eslint config#3270
arkid15r merged 3 commits intoOWASP:mainfrom
Shubb07:fix-duplicate-path-import

Conversation

@Shubb07
Copy link
Contributor

@Shubb07 Shubb07 commented Jan 9, 2026

Resolves #3266

This PR fixes the SonarCloud issue where the path module was imported multiple times in frontend/eslint.config.mjs by merging them into a single import.

This removes the javascript:S3863 code smell and improves maintainability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 9, 2026

Summary by CodeRabbit

  • Chores
    • Internal maintenance to align module imports with current runtime conventions for improved consistency and compatibility.
    • No user-facing changes, features, or behavior updates.

Note: This release contains no user-facing changes or new features.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Replaced duplicate imports by switching to Node built-in specifiers: merged path imports into node:path (default + named) and moved fileURLToPath import to node:url in the ESLint config. Runtime logic unchanged. (≤50 words)

Changes

Cohort / File(s) Summary
Import updates
frontend/eslint.config.mjs
Consolidated path imports to import path, { dirname } from 'node:path' and moved fileURLToPath import to node:url; removed duplicate/legacy imports.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • kasya
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: merging duplicate path imports in the eslint config file.
Description check ✅ Passed The description is directly related to the changeset, explaining the fix for the SonarCloud issue and the specific imports being consolidated.
Linked Issues check ✅ Passed The PR successfully addresses issue #3266 by merging duplicate path imports into a single import statement, eliminating the javascript:S3863 SonarCloud finding.
Out of Scope Changes check ✅ Passed All changes are in scope and directly address the objective of merging duplicate path imports; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b49c4e and 23af34d.

📒 Files selected for processing (1)
  • frontend/eslint.config.mjs
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/eslint.config.mjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 9, 2026
@arkid15r arkid15r enabled auto-merge January 9, 2026 19:25
Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2026

@arkid15r arkid15r added this pull request to the merge queue Jan 9, 2026
Merged via the queue into OWASP:main with commit 2b653ca Jan 9, 2026
27 checks passed
hussainjamal760 pushed a commit to hussainjamal760/Nest that referenced this pull request Jan 14, 2026
)

* fix(frontend): merge duplicate path imports in eslint config

* Update code

---------

Co-authored-by: Arkadii Yakovets <arkadii.yakovets@owasp.org>
Co-authored-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge duplicate 'path' imports in frontend/eslint.config.mjs (Sonar S3863)

2 participants

Comments