Skip to content

Rule no-textarea-mustache cannot difference <Textarea> component #2023

Closed
@qmhc

Description

@qmhc

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: ^8.24.0
  • eslint-plugin-vue version: ^9.5.1
  • Node version: 16.17.1
  • Operating System: Windows 10

Please show your full configuration:

{
  extends: [
    'plugin:vue/vue3-recommended',
    // 'standard',
    // 'plugin:jsonc/recommended-with-jsonc',
    // 'plugin:yml/standard',
    // 'plugin:markdown/recommended',
    '@vue/typescript/recommended'
  ],
  env: {
    es6: true,
    browser: true,
    node: true
  },
  parser: 'vue-eslint-parser',
  parserOptions: {
    ecmaVersion: 'latest'
  },
  reportUnusedDisableDirectives: true
}

What did you do?

<template>
  <Textarea value="Almost" :max-length="10">
    <template #count="{ value }">
      {{ `${value.length}/10` }}
    </template>
  </Textarea>
</template>

What did you expect to happen?

No error occurred.

What actually happened?

Get a error:

error  Unexpected mustache. Use 'v-model' instead  vue/no-textarea-mustache

Repository to reproduce this issue

You can add a valid test in here:

{
  filename: 'test.vue',
  code: '<template><div><Textarea>{{text}}</Textarea></div></template>'
}

Then test it and it will fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions