Skip to content

Resolve npm audit vulnerabilities and linting issues#52

Merged
wvanderp merged 7 commits intomainfrom
copilot/resolve-npm-audit-issues
Feb 12, 2026
Merged

Resolve npm audit vulnerabilities and linting issues#52
wvanderp merged 7 commits intomainfrom
copilot/resolve-npm-audit-issues

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Fixes 9 security vulnerabilities and eliminates all linting errors/warnings.

Security Updates

  • Updated vulnerable dependencies via npm audit fix:
    • @babel/runtime 7.26.7 → 7.28.6 (inefficient RegExp)
    • axios (DoS vulnerabilities)
    • react-router / react-router-dom (CSRF, XSS)
    • vite (file serving bypass)
    • lodash, js-yaml, brace-expansion, diff

Linting Fixes

  • PlaceSitemapPage.tsx: Removed @ts-nocheck, added type assertions for recursive tree navigation:
    // Before: @ts-nocheck suppressing errors
    <ListComponents tree={value} level={level + 1} />
    
    // After: Proper typing
    <ListComponents 
      tree={value as Record<string, unknown> | Webcam} 
      level={(level + 1) as 0 | 1 | 2 | 3 | 4} 
    />
  • Removed invalid sonarjs/cognitive-complexity rule from utils/collect.ts
  • Added descriptions to @ts-expect-error directives in youtubeLint.ts
  • Cleaned up 25 unused eslint-disable directives across 9 files
  • Added React version detection to eslint config

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node scripts/postinstall.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 11, 2026 18:34
Co-authored-by: wvanderp <2423856+wvanderp@users.noreply.github.com>
Co-authored-by: wvanderp <2423856+wvanderp@users.noreply.github.com>
Co-authored-by: wvanderp <2423856+wvanderp@users.noreply.github.com>
Copilot AI changed the title [WIP] Resolve all issues found by npm audit and fix linting issues Resolve npm audit vulnerabilities and linting issues Feb 11, 2026
Copilot AI requested a review from wvanderp February 11, 2026 18:40
- Updated various devDependencies in package.json to their latest versions for better compatibility and performance.
- Refactored ListPage, MapView, PlaceSitemapPage, WebcamPage, and WebcamsSitemapPage components to set document titles using useEffect for better lifecycle management.
- Improved pagination logic in WebcamsSitemapPage to ensure current page stays within valid bounds.
- Changed TypeScript module setting from commonjs to esnext for modern module support.
@wvanderp wvanderp marked this pull request as ready for review February 12, 2026 21:15
Copilot AI review requested due to automatic review settings February 12, 2026 21:15
Copy link

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 addresses npm security vulnerabilities and eliminates linting issues by updating dependencies, removing lodash, fixing TypeScript errors, and refactoring React components to follow best practices.

Changes:

  • Updated 9 vulnerable dependencies including axios, react-router, vite, and @babel/runtime
  • Removed lodash dependency and replaced with custom implementations (setNestedValue, chunkArray)
  • Fixed TypeScript/linting issues by removing @ts-nocheck directives, adding type assertions, and wrapping document.title updates in useEffect hooks
  • Updated GitHub Actions workflows and removed unused eslint-disable directives
  • Modernized tsconfig.json (module: "esnext", moduleResolution: "bundler")

Reviewed changes

Copilot reviewed 18 out of 21 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
package.json Updated vulnerable dependencies, removed lodash, added "start" script
package-lock.json Lockfile updates for dependency versions
tsconfig.json Changed module system to esnext with bundler resolution
eslint.config.mjs Restructured config format, added React version detection
src/components/pages/PlaceSitemapPage.tsx Removed @ts-nocheck, added custom setNestedValue to replace lodash.set
src/components/pages/WebcamsSitemapPage.tsx Refactored pagination with safeCurrentPage derived state
src/components/pages/WebcamPage.tsx Moved document.title to useEffect, simplified webcam lookup
src/components/pages/ListPage.tsx Added custom chunkArray to replace lodash.chunk
src/components/pages/MapView.tsx Moved document.title to useEffect
.github/workflows/*.yml Updated actions versions to v6, removed Node 18 from test matrix
utils/lint/*.ts Removed unnecessary eslint-disable comments, added @ts-expect-error descriptions

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

@wvanderp wvanderp merged commit 17a62ad into main Feb 12, 2026
11 checks passed
@wvanderp wvanderp deleted the copilot/resolve-npm-audit-issues branch February 12, 2026 21:49
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