Skip to content

[JS] 'Import attributes cannot be used with a type-only import' when formatting TypeScript #1987

Open
@yesudeep

Description

@yesudeep
./js/plugins/mcp/src/client/message.ts:17:73 syntax/correctness/noTypeOnlyImportAttributes ━━━━━━━━━━

  ✖ Import attributes cannot be used with a type-only import.
  
    15 │  */
    16 │ 
  > 17 │ import type { PromptMessage } from '@modelcontextprotocol/sdk/types.js' with {
       │                                                                         ^^^^^^
  > 18 │   'resolution-mode': 'import',
  > 19 │ };
       │ ^
    20 │ import { MessageData, Part } from 'genkit';
    21 │ 
  
  ℹ The type-only import is defined here.
  
    15 │  */
    16 │ 
  > 17 │ import type { PromptMessage } from '@modelcontextprotocol/sdk/types.js' with {
       │        ^^^^
    18 │   'resolution-mode': 'import',
    19 │ };

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions