Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 27, 2025

Ran formatters and fixed linting issues across Go and JavaScript codebases.

Changes

Go:

  • Fixed staticcheck SA4031 in pkg/cli/interactive_test.go - removed impossible nil check after struct initialization
  • Changed unused variable to blank identifier

JavaScript:

  • Added // prettier-ignore directives to preserve JSDoc type cast syntax in 3 files
  • Prevents prettier from removing required parentheses in /** @type {Type} */ (expr) patterns

Context

Prettier treats .cjs files as TypeScript and removes parentheses from JSDoc type casts, breaking TypeScript validation:

// Before: Valid JSDoc type cast
const err = /** @type {any} */ (error);

// After prettier (broken): Type cast not applied
const err = /** @type {any} */ error;

// Solution: Preserve with prettier-ignore
// prettier-ignore
const err = /** @type {any} */ (error);

All linters and tests passing.

Original prompt

Format and lint go and js.

Custom agent used: ci-cleaner
Tidies up the repository CI state by formatting sources, running linters, fixing issues, running tests, and recompiling workflows


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 27, 2025 18:11
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Format and lint Go and JavaScript files Format and lint Go and JavaScript code Dec 27, 2025
Copilot AI requested a review from pelikhan December 27, 2025 18:20
@pelikhan pelikhan marked this pull request as ready for review December 27, 2025 18:21
@pelikhan pelikhan merged commit 938beaa into main Dec 27, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/format-and-lint-go-js branch December 27, 2025 18:21
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