Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

136
Views
Is the default rule vue/attribute-hyphenation in conflict with vue/prop-name-casing?

I am working on the project using eslint-plugin-vue and I have child and parent components. the child component needs to pass a value into parent components.

// parent
export default {
  name: 'recordDetail',
  props: {
     'record-id': { // however this will violate vue/prop-name-casing
        type: Number
     }
  }
}
<!-- child -->
<recordDetail
  :record-id="123"> <!-- it will violate vue/attribute-hyphenation if this is recordId="123" -->
</recordDetail>

Please give me advice on how you will deal with this and what is the best practice on Vue. Thank you.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can simply use kebab-case in templates and camelCase on the JS side.

<recordDetail :record-id="123" />

will correspond to

props: {
  recordId: {
  ...
  }
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!