Skip to content

Fix @typescript-eslint/ban-ts-comment violations#329

Merged
hotlong merged 3 commits intocopilot/enhance-console-functionsfrom
copilot/update-action-steps-for-automation
Feb 2, 2026
Merged

Fix @typescript-eslint/ban-ts-comment violations#329
hotlong merged 3 commits intocopilot/enhance-console-functionsfrom
copilot/update-action-steps-for-automation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

CI lint was failing due to @ts-ignore directives which ESLint now prohibits in favor of @ts-expect-error.

Changes

Replaced all 4 instances of @ts-ignore with properly documented @ts-expect-error:

  • packages/plugin-grid/src/ObjectGrid.msw.test.tsx - Import from examples directory
  • packages/plugin-timeline/src/ObjectTimeline.msw.test.tsx - Mock schema type mismatch
  • packages/plugin-form/src/ObjectForm.msw.test.tsx - Import from examples directory
  • packages/cli/src/utils/app-generator.ts - Dynamic icon lookup by string key
-// @ts-ignore
+// @ts-expect-error - Dynamic icon lookup by string key
 const Icon = LucideIcons[name];

@ts-expect-error is safer as it errors if the suppression becomes unnecessary, while @ts-ignore silently does nothing.

Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21577574850/job/62168194500#step:8:1


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

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 2, 2026 5:09am
objectui-components Ready Ready Preview, Comment Feb 2, 2026 5:09am
objectui-crm-app Error Error Feb 2, 2026 5:09am

Request Review

Copilot AI and others added 2 commits February 2, 2026 05:02
- Replace @ts-ignore with @ts-expect-error in ObjectGrid.msw.test.tsx
- Replace @ts-ignore with @ts-expect-error in ObjectTimeline.msw.test.tsx with proper description
- Replace @ts-ignore with @ts-expect-error in ObjectForm.msw.test.tsx
- Replace @ts-ignore with @ts-expect-error in app-generator.ts

Fixes ESLint rule @typescript-eslint/ban-ts-comment violations

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Add descriptive explanation for @ts-expect-error directive

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong hotlong marked this pull request as ready for review February 2, 2026 05:03
Copilot AI review requested due to automatic review settings February 2, 2026 05:03
Copilot AI changed the title [WIP] Update action steps for improved automation Fix @typescript-eslint/ban-ts-comment violations Feb 2, 2026
Copilot AI requested a review from hotlong February 2, 2026 05:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates TypeScript suppression directives to satisfy ESLint rules and make intentional type mismatches explicit.

Changes:

  • Replaced @ts-ignore with @ts-expect-error in MSW-based tests for grid, form, and timeline plugins.
  • Replaced @ts-ignore with @ts-expect-error in the CLI app generator’s generated layout template for dynamic Lucide icon lookup.
  • Added/updated inline explanations to clarify why the type suppression is intentional.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/plugin-timeline/src/ObjectTimeline.msw.test.tsx Uses @ts-expect-error for intentionally mismatched mock schema in timeline MSW test.
packages/plugin-grid/src/ObjectGrid.msw.test.tsx Uses @ts-expect-error in grid MSW test for the example-based import.
packages/plugin-form/src/ObjectForm.msw.test.tsx Uses @ts-expect-error in form MSW test for the example-based import.
packages/cli/src/utils/app-generator.ts Uses @ts-expect-error in generated code for dynamic Lucide icon lookup by string key.

@hotlong hotlong merged commit 06fcaff into copilot/enhance-console-functions Feb 2, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants