Resolve npm audit vulnerabilities and linting issues#52
Merged
Conversation
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
- 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.
…and improve formatting
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 9 security vulnerabilities and eliminates all linting errors/warnings.
Security Updates
npm audit fix:@babel/runtime7.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,diffLinting Fixes
@ts-nocheck, added type assertions for recursive tree navigation:sonarjs/cognitive-complexityrule from utils/collect.ts@ts-expect-errordirectives in youtubeLint.tsWarning
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/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.