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

require-prop-comment #1993

Closed
Tracked by #50
czb3279338858 opened this issue Sep 28, 2022 · 1 comment · Fixed by #2019
Closed
Tracked by #50

require-prop-comment #1993

czb3279338858 opened this issue Sep 28, 2022 · 1 comment · Fixed by #2019

Comments

@czb3279338858
Copy link
Contributor

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

@FloEdelmann
Copy link
Member

I like the rule name and can see the benefit of adding this rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment