Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 820 Bytes

prop-name-casing.md

File metadata and controls

37 lines (26 loc) · 820 Bytes

enforce specific casing for the Prop name in Vue components (vue/prop-name-casing)

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

This rule would enforce proper casing of props in vue components(camelCase).

📖 Rule Details

(https://vuejs.org/v2/style-guide/#Prop-name-casing-strongly-recommended).

👍 Examples of correct code for camelCase:

export default {
  props: {
    greetingText: String
  }
}

👎 Examples of incorrect code for camelCase:

export default {
  props: {
    'greeting-text': String
  }
}

🔧 Options

Default casing is set to camelCase.

"vue/prop-name-casing": ["error", "camelCase|snake_case"]