Skip to content

Fix CI failures: missing lockfile, ESLint v9 flat config migration, lint errors#22

Merged
chiga0 merged 10 commits into
mainfrom
copilot/add-automated-testing-scripts
Mar 1, 2026
Merged

Fix CI failures: missing lockfile, ESLint v9 flat config migration, lint errors#22
chiga0 merged 10 commits into
mainfrom
copilot/add-automated-testing-scripts

Conversation

Copilot AI commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

CI was completely broken — both jobs (unit-tests and e2e-tests) failed at npm ci because package-lock.json was in .gitignore. The lint step also would have failed due to ESLint v9 requiring flat config format.

Changes

  • Lockfile: Remove package-lock.json from .gitignore, generate and commit it so npm ci works
  • ESLint v9 migration: Add eslint.config.js (flat config) since .eslintrc.cjs is unsupported in ESLint v9. Add missing eslint-plugin-react-refresh devDependency. Remove deprecated --ext flag from lint command in package.json and ci.yml
  • Fix 23 lint errors across 13 files:
    • Remove unused imports/variables (Heart, ComponentType, useStore, handleThemeChange, vi, renderHook, etc.)
    • Escape quotes in JSX (don'tdon't)
    • Prefix intentionally unused catch/event params with _
    • Disable react/prop-types (redundant with TypeScript)
    • Configure @typescript-eslint/no-unused-vars with argsIgnorePattern: '^_' and caughtErrorsIgnorePattern: '^_'
  • Fix ReDoS vulnerability in src/utils/validators.ts:
- /^https?:\/\/[a-z0-9]+([-.]?[a-z0-9]+)*\.[a-z]{2,}/i
+ /^https?:\/\/[a-z0-9]+(?:[-.][a-z0-9]+)*\.[a-z]{2,}/i

Making [-.] required (not optional) in the repeating group eliminates overlapping match paths that caused exponential backtracking.

User stories doc

Also includes a comprehensive user stories document (docs/user-stories.md) covering all 18 feature areas (US-01 through US-18, including AI translation/summarization), with E2E coverage matrix mapping each acceptance scenario to existing test files. Six new E2E test files added for previously uncovered areas (favorites, history, search, feed management, article reading, AI features).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@netlify

netlify Bot commented Mar 1, 2026

Copy link
Copy Markdown

Deploy Preview for rss-reader-pwa ready!

Name Link
🔨 Latest commit 166306d
🔍 Latest deploy log https://app.netlify.com/projects/rss-reader-pwa/deploys/69a3cfdb216c860008da7f0f
😎 Deploy Preview https://deploy-preview-22--rss-reader-pwa.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI and others added 3 commits March 1, 2026 03:23
- Create playwright.ci.config.ts targeting reader.chigao.site
- Add E2E tests: page load, feed subscription, theme, settings
- Create .github/workflows/ci.yml for automated testing on PR/push
- Add test:e2e:ci script to package.json

Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
Copilot AI changed the title [WIP] Add automated testing scripts for feature validation Add CI workflow and E2E tests against live site Mar 1, 2026
Copilot AI and others added 4 commits March 1, 2026 04:00
Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
…mgmt/AI features

- Add US-17 (AI Translation) and US-18 (AI Summarization) to user stories
- Add E2E tests: favorites, history, search, feedManagement, articleReading, aiFeatures
- Add search and feed-management page load tests to pageLoad.spec.ts
- Update coverage matrix in user stories document
- Remove waitForTimeout anti-patterns from new tests

Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
…2E tests

Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
Copilot AI changed the title Add CI workflow and E2E tests against live site Add user stories document and comprehensive E2E test coverage including AI features Mar 1, 2026
Copilot AI and others added 2 commits March 1, 2026 05:31
…lat config, fix lint errors

Root causes:
1. package-lock.json was in .gitignore, causing `npm ci` to fail
2. ESLint v9 requires flat config (eslint.config.js), but only .eslintrc.cjs existed
3. eslint-plugin-react-refresh was missing from devDependencies
4. 23 ESLint errors across src and test files

Fixes:
- Remove package-lock.json from .gitignore and commit the lockfile
- Create eslint.config.js (flat config) for ESLint v9 compatibility
- Add eslint-plugin-react-refresh to devDependencies
- Fix all 23 ESLint errors:
  - Remove unused imports (Heart, ComponentType, useStore, vi, renderHook, act, etc.)
  - Remove unused variables (handleThemeChange, initialHasLight, initialIsDark, etc.)
  - Escape quotes in JSX (react/no-unescaped-entities)
  - Fix unnecessary regex escapes (no-useless-escape)
  - Prefix intentionally unused params with _ (catch clauses, event handlers)
  - Disable react/prop-types (TypeScript handles this)
  - Configure @typescript-eslint/no-unused-vars with _-prefix patterns
- Update lint script: remove deprecated --ext flag for ESLint v9
- Update CI workflow lint command to match

Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
Change `([-.]?[a-z0-9]+)*` to `(?:[-.][a-z0-9]+)*` to prevent
exponential backtracking on malicious inputs like 'http://0' + '0'*n.

Co-authored-by: chiga0 <24784430+chiga0@users.noreply.github.com>
Copilot AI changed the title Add user stories document and comprehensive E2E test coverage including AI features Fix CI failures: missing lockfile, ESLint v9 flat config migration, lint errors Mar 1, 2026
@chiga0
chiga0 marked this pull request as ready for review March 1, 2026 06:27
@chiga0
chiga0 merged commit d263e99 into main Mar 1, 2026
6 checks passed
@chiga0
chiga0 deleted the copilot/add-automated-testing-scripts branch March 1, 2026 06:27
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