Skip to content

Commit 0ccb35e

Browse files
authored
Merge pull request #1266 from nextcloud-libraries/feat/vue3-attrs-casing
feat(vue3): force camelCase for props in template
2 parents 4d417a9 + c609afb commit 0ccb35e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/configs/vue3.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export function vue3(options: ConfigOptions): Linter.Config[] {
2828
{
2929
files: GLOB_FILES_VUE,
3030
rules: {
31+
// Force camelCase in props/attrs for consistency with <script> and prevent tooling issues
32+
'vue/attribute-hyphenation': ['error', 'never'],
3133
// Force camelCase for custom event name definitions (recommended by Vue 3 documentation and consistent with JS)
3234
'vue/custom-event-name-casing': [
3335
'error',
@@ -37,9 +39,9 @@ export function vue3(options: ConfigOptions): Linter.Config[] {
3739
ignores: ['/^[a-z]+:[a-z]+$/iu'],
3840
},
3941
],
40-
// Also force camelCase for events in template for consistency with <script>
42+
// Force camelCase for events in template for consistency with <script>
4143
'vue/v-on-event-hyphenation': ['error', 'never', { autofix: true }],
42-
// Also for slots
44+
// Force camelCase for slot names.
4345
// Changing case is breaking for component users.
4446
// For libraries it may result in a breaking change. Warn to prevent unintended breaking change.
4547
// TODO: allow namespace:slotName format like in events

0 commit comments

Comments
 (0)