Skip to content

Commit 914f52d

Browse files
waynzhFloEdelmann
andauthored
Apply suggestions from code review
Co-authored-by: Flo Edelmann <[email protected]>
1 parent 988ef2f commit 914f52d

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

docs/rules/v-on-event-hyphenation.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,15 @@ Don't use hyphenated name but allow custom event names
108108

109109
### `"never", { "ignoreTags": ["/^custom-/"] }`
110110

111-
Ignore tags from applying this rule.
112-
113111
<eslint-code-block fix :rules="{'vue/v-on-event-hyphenation': ['error', 'never', { ignoreTags: ['/^custom-/'], autofix: true }]}">
114112

115113
```vue
116114
<template>
117115
<!-- ✓ GOOD -->
118-
<custom-component v-on:custom-event="handleEvent" />
116+
<custom-component v-on:my-event="handleEvent" />
119117
120118
<!-- ✗ BAD -->
121-
<my-component v-on:custom-event="handleEvent" />
119+
<my-component v-on:my-event="handleEvent" />
122120
</template>
123121
```
124122

lib/rules/attribute-hyphenation.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ module.exports = {
142142
return useHyphenated ? value.toLowerCase() === value : !/-/.test(value)
143143
}
144144

145-
/**
146-
* @param {string} name
147-
*/
145+
/** @param {string} name */
148146
function isIgnoredTags(name) {
149147
return ignoreTags.some((re) => re.test(name))
150148
}

lib/rules/v-on-event-hyphenation.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ module.exports = {
111111
return useHyphenated ? value.toLowerCase() === value : !/-/.test(value)
112112
}
113113

114-
/**
115-
* @param {string} name
116-
*/
114+
/** @param {string} name */
117115
function isIgnoreTags(name) {
118116
return ignoreTags.some((re) => re.test(name))
119117
}

0 commit comments

Comments
 (0)