Skip to content

Commit d6f0337

Browse files
authored
Meta: Fix replacedBy position (#1783)
1 parent 56bcdb4 commit d6f0337

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

lib/rules/name-property-casing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ module.exports = {
1919
description:
2020
'enforce specific casing for the name property in Vue components',
2121
categories: ['vue3-strongly-recommended', 'strongly-recommended'],
22-
url: 'https://eslint.vuejs.org/rules/name-property-casing.html',
23-
replacedBy: ['component-definition-name-casing']
22+
url: 'https://eslint.vuejs.org/rules/name-property-casing.html'
2423
},
2524
deprecated: true,
25+
replacedBy: ['component-definition-name-casing'],
2626
fixable: 'code', // or "code" or "whitespace"
2727
schema: [
2828
{

lib/rules/no-confusing-v-for-v-if.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ module.exports = {
4343
docs: {
4444
description: 'disallow confusing `v-for` and `v-if` on the same element',
4545
categories: ['vue3-recommended', 'recommended'],
46-
url: 'https://eslint.vuejs.org/rules/no-confusing-v-for-v-if.html',
47-
replacedBy: ['no-use-v-if-with-v-for']
46+
url: 'https://eslint.vuejs.org/rules/no-confusing-v-for-v-if.html'
4847
},
4948
deprecated: true,
49+
replacedBy: ['no-use-v-if-with-v-for'],
5050
fixable: null,
5151
schema: []
5252
},

lib/rules/no-unregistered-components.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ module.exports = {
4444
'disallow using components that are not registered inside templates',
4545
categories: null,
4646
recommended: false,
47-
url: 'https://eslint.vuejs.org/rules/no-unregistered-components.html',
48-
replacedBy: ['no-undef-components']
47+
url: 'https://eslint.vuejs.org/rules/no-unregistered-components.html'
4948
},
5049
deprecated: true,
50+
replacedBy: ['no-undef-components'],
5151
fixable: null,
5252
schema: [
5353
{

tools/update-docs-rules-index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function toRuleRow(rule) {
3838

3939
function toDeprecatedRuleRow(rule) {
4040
const link = `[${rule.ruleId}](./${rule.name}.md)`
41-
const replacedRules = rule.meta.docs.replacedBy || []
41+
const replacedRules = rule.meta.replacedBy || []
4242
const replacedBy = replacedRules
4343
.map((name) => `[vue/${name}](./${name}.md)`)
4444
.join(', ')

tools/update-docs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ class DocFile {
120120
const notes = []
121121

122122
if (meta.deprecated) {
123-
if (meta.docs.replacedBy) {
124-
const replacedRules = meta.docs.replacedBy.map(
123+
if (meta.replacedBy) {
124+
const replacedRules = meta.replacedBy.map(
125125
(name) => `[vue/${name}](${name}.md) rule`
126126
)
127127
notes.push(

0 commit comments

Comments
 (0)