Fix ESLint flat config flag, tsconfig moduleResolution, scripts dependency drift, and CI lint workflow#72
Fix ESLint flat config flag, tsconfig moduleResolution, scripts dependency drift, and CI lint workflow#72
Conversation
…ncy versions Co-authored-by: SolanaRemix <[email protected]>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
🤖 Auto-Test Results
Automated checks completed at 2026-02-23T09:56:40.763Z |
There was a problem hiding this comment.
Pull request overview
This PR fixes three configuration correctness issues related to ESLint flat config compatibility, TypeScript module resolution, and dependency version drift. The changes ensure the project's tooling configuration is consistent and uses modern best practices for an ESM-based project with bundler tooling.
Changes:
- Remove deprecated
--extflag from ESLint commands (incompatible with ESLint 9+ flat config) - Update TypeScript moduleResolution from
nodetobundler(correct for ESM + bundler projects) - Sync
scripts/package.jsondependency versions with root package.json
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
package.json |
Remove --ext .js,.ts,.jsx,.tsx flag from lint scripts (unsupported in ESLint 9+ flat config) |
tsconfig.json |
Change moduleResolution from node to bundler (correct for ESM projects using esbuild) |
scripts/package.json |
Update openai to ^6.18.0 and @types/node to ^25.2.1 to match root package.json versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
package.json
Outdated
| "lint": "eslint .", | ||
| "lint:fix": "eslint . --fix", |
There was a problem hiding this comment.
The CI workflow still invokes ESLint with --ext (see .github/workflows/lint.yml), so even though npm run lint is fixed here, PR builds will continue to fail under ESLint flat config. Update the workflow to drop --ext (or switch it to npm run lint plus --max-warnings 0).
There was a problem hiding this comment.
Fixed in b3ff9a5. Changed the ESLint step in .github/workflows/lint.yml from npx eslint . --ext .js,.ts,.jsx,.tsx --max-warnings 0 to npm run lint -- --max-warnings 0, delegating to the npm script (which already drops --ext) while preserving the CI zero-warnings enforcement.
| "dependencies": { | ||
| "openai": "^6.17.0" | ||
| "openai": "^6.18.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^25.1.0", | ||
| "@types/node": "^25.2.1", |
There was a problem hiding this comment.
scripts/package.json dependency versions were updated, but scripts/package-lock.json still pins the previous openai and @types/node ranges. Please regenerate/update the scripts lockfile so npm ci in scripts/ stays deterministic and consistent with this change.
There was a problem hiding this comment.
Fixed in b3ff9a5. Ran npm install in the scripts/ directory to regenerate scripts/package-lock.json. The lockfile now reflects openai: ^6.18.0 (resolved to 6.25.0) and @types/node: ^25.2.1 (resolved to 25.3.3), consistent with the updated scripts/package.json.
Co-authored-by: SolanaRemix <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- scripts/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "openai": "^6.18.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^25.1.0", | ||
| "@types/node": "^25.2.1", | ||
| "ts-node": "^10.9.2", |
There was a problem hiding this comment.
This dependency bump changes scripts/package.json, but scripts/package-lock.json still pins openai and @types/node to the previous ranges/versions. Please regenerate/update the scripts lockfile so npm ci in scripts/ remains deterministic and consistent with the updated manifest.
There was a problem hiding this comment.
Already addressed in b3ff9a5. scripts/package-lock.json was regenerated via npm install in the scripts/ directory and now reflects openai: ^6.18.0 and @types/node: ^25.2.1.
Co-authored-by: Copilot <[email protected]>
🤖 Auto-Test Results
Automated checks completed at 2026-03-02T09:15:35.779Z |
🤖 Auto-Test Results
Automated checks completed at 2026-03-02T09:16:06.881Z |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- scripts/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "lint": "eslint . --max-warnings 0", | ||
| "lint:fix": "eslint . --fix", |
There was a problem hiding this comment.
The PR description says lint should become eslint . (and CI would pass --max-warnings 0 when needed), but this change hard-codes --max-warnings 0 into the lint script. Decide where warnings should be enforced (script vs CI) and keep it consistent; otherwise this is a behavior change for all local runs and other workflows that call npm run lint (e.g. CI/advanced-build).
|
|
||
| - name: Run ESLint | ||
| run: npx eslint . --ext .js,.ts,.jsx,.tsx --max-warnings 0 | ||
| run: npm run lint -- --max-warnings 0 |
There was a problem hiding this comment.
This now runs npm run lint while also passing --max-warnings 0, but the lint script itself already includes --max-warnings 0. Dropping the extra CLI args (or removing it from the script instead) avoids duplicating flags and reduces the risk of ESLint rejecting/overriding repeated options.
| run: npm run lint -- --max-warnings 0 | |
| run: npm run lint |
Four config correctness issues: ESLint
--extflag breaks under flat config (ESLint 9+),moduleResolutionis mismatched for an ESM+bundler project,scripts/package.jsonhas stale dependency versions, and the CI lint workflow was still invoking ESLint with the incompatible--extflag directly.Changes
package.json— Remove--ext .js,.ts,.jsx,.tsxfromlintandlint:fixscripts; flag is unsupported in flat config mode and redundant sinceeslint.config.jsalready scopes viafilestsconfig.json—moduleResolution: node→bundler; correct resolver for ESM projects using esbuildscripts/package.json— Alignopenai(^6.17.0→^6.18.0) and@types/node(^25.1.0→^25.2.1) to match rootpackage.json.github/workflows/lint.yml— Replacenpx eslint . --ext .js,.ts,.jsx,.tsx --max-warnings 0withnpm run lint -- --max-warnings 0so the CI job delegates to the fixed npm script and remains compatible with ESLint 9 flat configscripts/package-lock.json— Regenerated to reflect updatedopenai(^6.18.0) and@types/node(^25.2.1) ranges, keepingnpm ciinscripts/deterministic and consistentOriginal prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.