Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 1, 2025

This PR resolves all ESLint errors that were causing the Continuous Integration pipeline to fail. The errors included unused variables, unnecessary escape characters in regex patterns, bad case block declarations, and missing const declarations.

Issues Fixed

The following ESLint errors have been resolved across three files:

packages/browser-client/src/lsp/lsp-server-worker.ts

  • Unused variables: Fixed unused text and params parameters by prefixing with _
  • Dead code removal: Removed entirely unused SimpleYAbelParser class and parser variable
  • Const preference: Changed documents from let to const as it's never reassigned
  • Case block declarations: Wrapped variable declaration in textDocument/completion case with braces
  • Unnecessary escapes: Removed backslash escapes for quotes in error messages

packages/browser-client/src/main.ts

  • Unused variables: Fixed unused index parameter in validateDocumentStructure by prefixing with _
  • Unnecessary escapes: Removed backslash escapes for forward slashes in regex patterns for date validation

packages/lsp-server/src/capabilities/diagnostics.ts

  • Unused variables: Fixed unused document parameters in three validation methods by prefixing with _
  • Unnecessary escapes: Removed backslash escapes for forward slashes in date regex patterns

Verification

All quality checks now pass:

  • ✅ ESLint: 0 errors, 0 warnings
  • ✅ Build: All packages compile successfully
  • ✅ Tests: All existing tests continue to pass
  • ✅ Type checking: TypeScript compilation successful

The changes are minimal and surgical, focusing only on fixing the linting errors without modifying any core functionality. Code formatting has also been applied with Prettier for consistency.

Fixes the CI failure referenced in commit e20137df837d8f0b28e545daa00be5418785f6e8.

Original prompt

This section details on the original issue you should resolve

<issue_title>Issue: Fix ESLint Errors Causing CI Failure</issue_title>
<issue_description>#### Description
This issue addresses the ESLint errors that are causing the Continuous Integration (CI) to fail as seen in the GitHub Actions
The errors include:

  • Unused variables
  • Unnecessary escape characters
  • Bad case block declarations
  • Missing use of const

Affected Files

  • packages/browser-client/src/lsp/lsp-server-worker.ts
  • packages/browser-client/src/main.ts
  • packages/lsp-server/src/capabilities/diagnostics.ts

Acceptance Criteria

  • No ESLint errors remain.
  • CI lint step passes successfully.

References

Comments on the Issue (you are @copilot in this section)

Fixes #1

💡 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.

@Copilot Copilot AI changed the title [WIP] Issue: Fix ESLint Errors Causing CI Failure Fix ESLint errors causing CI failure Oct 1, 2025
@Copilot Copilot AI requested a review from horner October 1, 2025 11:13
Copilot finished work on behalf of horner October 1, 2025 11:13
@horner
Copy link
Member

horner commented Oct 1, 2025

@copilot npm run test is failing

Copy link
Author

Copilot AI commented Oct 1, 2025

@copilot npm run test is failing

The test failure was due to missing dependencies. After running npm install to restore the node_modules directory, all tests now pass successfully. The ESLint fixes are working correctly and haven't broken any functionality.

Copilot finished work on behalf of horner October 1, 2025 11:47
@horner
Copy link
Member

horner commented Oct 2, 2025

@copilot npm run test fails

Copy link
Author

Copilot AI commented Oct 2, 2025

@copilot npm run test fails

The test failure is due to missing dependencies (node_modules not installed). This is not caused by the ESLint fixes - the same error occurs on the original commit before my changes.

To fix: run npm install before npm run test. After installing dependencies, all tests pass successfully with the ESLint fixes in place.

The CI should include an npm install step before running tests. The ESLint fixes themselves are working correctly and don't break any functionality.

Copilot finished work on behalf of horner October 2, 2025 03:18
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.

Issue: Fix ESLint Errors Causing CI Failure

2 participants