Skip to content

require-prop-comment #1993

Closed
Closed
@czb3279338858

Description

@czb3279338858

Please describe what the rule should do:

require prop should have a comment

What category should the rule belong to?

[ ] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[X ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

      <template>
        <div>1</div>
      </template>
      <script setup>
      const props = defineProps({
        a: Number
      })
      </script>
      <template>
        <div>1</div>
      </template>
      <script>
      import { defineComponent } from '@vue/composition-api'

      export default defineComponent({
        props: {
          /**
           * a comment
           */
          a: Number,
          b: Number,
          // c
          // comment
          c: Number
        },
        setup() {}
      })
      </script>

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions