Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode table slot interface is defined but never used #2592

Closed
vikyd opened this issue Apr 6, 2023 · 2 comments
Closed

VSCode table slot interface is defined but never used #2592

vikyd opened this issue Apr 6, 2023 · 2 comments
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@vikyd
Copy link

vikyd commented Apr 6, 2023

<template>
  <t-table :columns="columns" :data="list">
    <template #a="{ row }: BaseTableCellEventContext<Item>">
      {{ row.a }}
    </template>
  </t-table>
</template>
<script setup lang="ts">
import { BaseTableCellEventContext, BaseTableCol } from 'tdesign-vue-next'

interface Item {
  a: string
  b: number
}

const columns: BaseTableCol[] = [
  {
    colKey: 'a',
    title: 'a',
    cell: 'a',
  },
  {
    colKey: 'b',
    title: 'b',
    cell: 'b',
  },
]

const list: Item[] = [
  {
    a: 'a1',
    b: 1,
  },
  {
    a: 'a2',
    b: 2,
  },
]
</script>

Problems:

'BaseTableCellEventContext' is defined but never used. Allowed unused vars must match /^_/u.eslint[@typescript-eslint/no-unused-vars](https://typescript-eslint.io/rules/no-unused-vars)
'BaseTableCellEventContext' is defined but never used. Allowed unused vars must match /^_/u.eslint[no-unused-vars](https://eslint.org/docs/rules/no-unused-vars)

image

@sullyD64
Copy link

sullyD64 commented Apr 13, 2023

I have the same problem with:

  • vue.volar@1.2
  • @typescript-eslint/eslint-plugin@5.58.0
  • @typescript-eslint/parser@5.58.0
  • eslint@8.31.0
  • eslint-plugin-vue@9.10.0
  • eslint-plugin-unused-imports@^2.0.0

@johnsoncodehk
Copy link
Member

Fixed by d35ed09

@johnsoncodehk johnsoncodehk added bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first
Projects
None yet
Development

No branches or pull requests

3 participants