You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
This rule would enforce proper casing of props in vue components (camelCase).
We already have a rule for checking HTML attributes casing, and this would make a good addition to that rule.
We could add different casing as options and set camelCase as default, but I think we should definitely forbid two of them anyway:
kebab-case - which doesn't make any sense and should be avoided
PascalCase - as this is the casing recommended for components, and users should not be able to mix props with components
so in the end there may be two options:
camelCase
snake_case
Which makes me think if this rule shouldn't be named props-camel-casing and force only one style of props names.
// bad
props: {
'greeting-text': String
}
// good
props: {
greetingText: String
}
The text was updated successfully, but these errors were encountered:
Style guide:
https://vuejs.org/v2/style-guide/#Prop-name-casing-strongly-recommended
Description:
This rule would enforce proper casing of props in vue components (camelCase).
We already have a rule for checking HTML attributes casing, and this would make a good addition to that rule.
We could add different casing as options and set camelCase as default, but I think we should definitely forbid two of them anyway:
so in the end there may be two options:
Which makes me think if this rule shouldn't be named
props-camel-casing
and force only one style of props names.The text was updated successfully, but these errors were encountered: