Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.04 KB

prop-name-casing.md

File metadata and controls

42 lines (29 loc) · 1.04 KB

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

  • ⚙️ This rule is included in "plugin:vue/strongly-recommended" and "plugin:vue/recommended".
  • 🔧 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"]

Related links