Fix tribe2 build: downgrade ESLint to 8.54.0 and resolve lint errors #124
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.
Problem
The
npm run build --prefix=../games/tribe2command was failing due to an ESLint version mismatch. The tribe2 game had been upgraded to ESLint 9.37.0, which requires the neweslint.config.jsconfiguration format, but the project still used the legacy.eslintrc.cjsformat. This caused the lint command to fail completely.Additionally, the
@typescript-eslint/eslint-plugindependency was missing from the package.json, which would prevent ESLint from running TypeScript-specific rules.Solution
This PR fixes the issue by:
Downgrading ESLint from 9.37.0 to 8.54.0 to maintain consistency with other games in the repository (hungry-lion, masterplan, nukes, tribe, xmas all use ESLint 8.54.0)
Adding the missing dependency
@typescript-eslint/eslint-plugin@^8.6.0to enable TypeScript lintingResolving lint errors with minimal eslint-disable comments:
GameOverDetailsinterface (placeholder for future use)anytypes in behavior tree context (required for generic execution context)updateBehaviorTreefunction (TODO implementation)Verification
All commands now work correctly:
npm run lint- passes with 0 errors and 0 warningsnpm run type-check- TypeScript compilation succeedsnpm run build- builds successfullyThis ensures tribe2 will build correctly in the GitHub Actions CI/CD pipelines.
Original prompt
💡 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.