CC-78: Migrate Game Systems to Shared ESLint Config#8
Conversation
Resolves CC-78
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR migrates the repository's ESLint configuration from the legacy CommonJS format ( 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 21-24: Replace the npm install invocations in the CI job steps for
the lint, test, and build jobs with npm ci to ensure deterministic installs;
locate the steps labeled "Install dependencies" in the lint, test and build jobs
and change the run command from "npm install" to "npm ci" while preserving the
existing NPM_TOKEN: ${{ secrets.NPM_TOKEN }} env block.
- Around line 17-19: Update each job that uses actions/setup-node@v4 to pin the
action to the specific commit SHA (replace uses: actions/setup-node@v4 with
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020) in the lint,
test and build jobs, and replace any npm install invocations with npm ci to
ensure deterministic installs; verify node-version: '20' remains unchanged and
run a quick workflow lint to validate the YAML.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c1ec7391-44e1-4fc2-b332-ebf5b1196cc8
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (18)
.eslintrc.cjs.github/workflows/ci.ymleslint.config.mjspackage.jsonsrc/battlefront/_shared/helpers/calculateMatchResultDetails.test.tssrc/battlefront/_shared/schema/listData.test.tssrc/battlefront/_shared/schema/listData.validators.tssrc/battlefront/flamesOfWarV4/schema/gameSystemConfig.tssrc/battlefront/flamesOfWarV4/schema/registrationDetails.tssrc/battlefront/flamesOfWarV4/static/lessonsFromTheFrontVersions.tssrc/battlefront/flamesOfWarV4/static/missionPackUtils.tssrc/battlefront/greatWarV4/schema/gameSystemConfig.tssrc/battlefront/greatWarV4/static/missionPackUtils.tssrc/battlefront/teamYankeeV2/schema/gameSystemConfig.tssrc/battlefront/teamYankeeV2/schema/registrationDetails.tssrc/battlefront/teamYankeeV2/static/fieldManual101Versions.tssrc/battlefront/teamYankeeV2/static/missionPackUtils.tssrc/common/static/tournamentPairingMethods.ts
💤 Files with no reviewable changes (1)
- .eslintrc.cjs
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Read-only verification: resolve the current commit behind setup-node v4 tag
gh api repos/actions/setup-node/git/ref/tags/v4 --jq '.object.sha'Repository: ianpaschal/combat-command-game-systems
Length of output: 123
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the relevant workflow portions around the referenced lines
nl -ba .github/workflows/ci.yml | sed -n '1,140p'Repository: ianpaschal/combat-command-game-systems
Length of output: 125
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE=".github/workflows/ci.yml"
echo "=== file head ==="
cat -n "$FILE" | head -n 120
echo "=== grep setup-node usages ==="
rg -n "uses:\s*actions/setup-node@v4" "$FILE" || true
echo "=== grep npm install ==="
rg -n "npm\s+install" "$FILE" || true
echo "=== grep NPM_TOKEN env usage ==="
rg -n "NPM_TOKEN" "$FILE" || trueRepository: ianpaschal/combat-command-game-systems
Length of output: 2344
🏁 Script executed:
#!/bin/bash
set -euo pipefail
ls -la
test -f package-lock.json && echo "FOUND package-lock.json" || echo "NO package-lock.json"
test -f npm-shrinkwrap.json && echo "FOUND npm-shrinkwrap.json" || echo "NO npm-shrinkwrap.json"Repository: ianpaschal/combat-command-game-systems
Length of output: 1352
🏁 Script executed:
#!/bin/bash
set -euo pipefail
ls -la .npmrc || echo "NO .npmrc"
rg -n "NPM_TOKEN" .npmrc ./* 2>/dev/null || trueRepository: ianpaschal/combat-command-game-systems
Length of output: 267
Pin actions/setup-node to a full commit SHA.
actions/setup-node@v4 resolves to 49933ea5288caeca8642d1e84afbd3f7d6820020; pin this SHA to prevent tag-movement supply-chain risk. Update all three jobs (lint, test, build) where uses: actions/setup-node@v4 appears.
Also switch npm install → npm ci for deterministic installs (a package-lock.json is present).
🧰 Tools
🪛 zizmor (1.25.2)
[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci.yml around lines 17 - 19, Update each job that uses
actions/setup-node@v4 to pin the action to the specific commit SHA (replace
uses: actions/setup-node@v4 with uses:
actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020) in the lint, test
and build jobs, and replace any npm install invocations with npm ci to ensure
deterministic installs; verify node-version: '20' remains unchanged and run a
quick workflow lint to validate the YAML.
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| env: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE=".github/workflows/ci.yml"
echo "== File = $FILE =="
ls -la "$FILE" || true
echo
# Show the referenced region with line numbers
nl -ba "$FILE" | sed -n '1,120p'
# Specifically extract any npm install commands
echo
echo "== Any npm install usages in $FILE =="
rg -n --context 2 "npm (install|ci)\b" "$FILE" || true
# Also check if package-lock.json exists (npm ci requires it)
echo
echo "== Check for package-lock.json =="
ls -ლა package-lock.json 2>/dev/null || true
ls -la . | headRepository: ianpaschal/combat-command-game-systems
Length of output: 257
🏁 Script executed:
#!/bin/bash
set -euo pipefail
FILE=".github/workflows/ci.yml"
echo "== File = $FILE =="
ls -la "$FILE" || true
echo
# Show the beginning portion with line numbers (no `nl` available)
echo "== $FILE (lines 1-120) =="
cat -n "$FILE" | sed -n '1,120p'
echo
echo "== Any npm (install|ci) usages in $FILE =="
rg -n --context 2 "npm (install|ci)\b" "$FILE" || true
echo
echo "== Check for package-lock.json (required for npm ci) =="
ls -la package-lock.json 2>/dev/null || echo "package-lock.json not found"
ls -la . | head -n 20Repository: ianpaschal/combat-command-game-systems
Length of output: 3864
Use npm ci instead of npm install in CI jobs
Replace npm install with npm ci in the lint, test, and build jobs.
Suggested change
- run: npm install
+ run: npm ciUpdate the same run: line at Lines 21, 40, and 64 (keep the existing NPM_TOKEN env block).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci.yml around lines 21 - 24, Replace the npm install
invocations in the CI job steps for the lint, test, and build jobs with npm ci
to ensure deterministic installs; locate the steps labeled "Install
dependencies" in the lint, test and build jobs and change the run command from
"npm install" to "npm ci" while preserving the existing NPM_TOKEN: ${{
secrets.NPM_TOKEN }} env block.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Resolves CC-78
Summary by CodeRabbit
Chores
Tests