Skip to content

Commit 085f1ca

Browse files
Arcanemagusmysticatea
authored andcommitted
Docs: Add URL to rule documentation to the metadata (#340)
ESLint v4.15.0 added an official location for rules to store a URL to their documentation in the rule metadata in eslint/eslint#9788. This adds the URL to all the existing rules so anything consuming them can know where their documentation is without having to resort to external packages to guess.
1 parent 9f83c5a commit 085f1ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+100
-50
lines changed

lib/rules/attribute-hyphenation.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ module.exports = {
5959
meta: {
6060
docs: {
6161
description: 'enforce attribute naming style in template',
62-
category: 'strongly-recommended'
62+
category: 'strongly-recommended',
63+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/attribute-hyphenation.md'
6364
},
6465
fixable: 'code',
6566
schema: [

lib/rules/comment-directive.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ module.exports = {
124124
meta: {
125125
docs: {
126126
description: 'support comment-directives in `<template>`', // eslint-disable-line consistent-docs-description
127-
category: 'base'
127+
category: 'base',
128+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/comment-directive.md'
128129
},
129130
schema: []
130131
},

lib/rules/html-closing-bracket-newline.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ module.exports = {
7777
meta: {
7878
docs: {
7979
description: "require or disallow a line break before tag's closing brackets",
80-
category: undefined
80+
category: undefined,
81+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-closing-bracket-newline.md'
8182
},
8283
fixable: 'whitespace',
8384
schema: [{

lib/rules/html-closing-bracket-spacing.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ module.exports = {
5252
meta: {
5353
docs: {
5454
description: 'require or disallow a space before tag\'s closing brackets',
55-
category: undefined
55+
category: undefined,
56+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-closing-bracket-spacing.md'
5657
},
5758
schema: [{
5859
type: 'object',

lib/rules/html-end-tags.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ module.exports = {
6161
meta: {
6262
docs: {
6363
description: 'enforce end tag style',
64-
category: 'strongly-recommended'
64+
category: 'strongly-recommended',
65+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-end-tags.md'
6566
},
6667
fixable: 'code',
6768
schema: []

lib/rules/html-indent.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ module.exports = {
2828
meta: {
2929
docs: {
3030
description: 'enforce consistent indentation in `<template>`',
31-
category: 'strongly-recommended'
31+
category: 'strongly-recommended',
32+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-indent.md'
3233
},
3334
fixable: 'whitespace',
3435
schema: [

lib/rules/html-quotes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ module.exports = {
7070
meta: {
7171
docs: {
7272
description: 'enforce quotes style of HTML attributes',
73-
category: 'recommended'
73+
category: 'recommended',
74+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-quotes.md'
7475
},
7576
fixable: 'code',
7677
schema: [

lib/rules/html-self-closing.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ module.exports = {
152152
meta: {
153153
docs: {
154154
description: 'enforce self-closing style',
155-
category: 'strongly-recommended'
155+
category: 'strongly-recommended',
156+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-self-closing.md'
156157
},
157158
fixable: 'code',
158159
schema: {

lib/rules/jsx-uses-vars.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ module.exports = {
3838
meta: {
3939
docs: {
4040
description: 'prevent variables used in JSX to be marked as unused', // eslint-disable-line consistent-docs-description
41-
category: 'base'
41+
category: 'base',
42+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/jsx-uses-vars.md'
4243
},
4344
schema: []
4445
},

lib/rules/max-attributes-per-line.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ module.exports = {
1313
meta: {
1414
docs: {
1515
description: 'enforce the maximum number of attributes per line',
16-
category: 'strongly-recommended'
16+
category: 'strongly-recommended',
17+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/max-attributes-per-line.md'
1718
},
1819
fixable: null,
1920
schema: [

lib/rules/mustache-interpolation-spacing.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ module.exports = {
1818
meta: {
1919
docs: {
2020
description: 'enforce unified spacing in mustache interpolations',
21-
category: 'strongly-recommended'
21+
category: 'strongly-recommended',
22+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/mustache-interpolation-spacing.md'
2223
},
2324
fixable: 'whitespace',
2425
schema: [

lib/rules/name-property-casing.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ module.exports = {
4949
meta: {
5050
docs: {
5151
description: 'enforce specific casing for the name property in Vue components',
52-
category: 'strongly-recommended'
52+
category: 'strongly-recommended',
53+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/name-property-casing.md'
5354
},
5455
fixable: 'code', // or "code" or "whitespace"
5556
schema: [

lib/rules/no-async-in-computed-properties.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ module.exports = {
148148
meta: {
149149
docs: {
150150
description: 'disallow asynchronous actions in computed properties',
151-
category: 'essential'
151+
category: 'essential',
152+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-async-in-computed-properties.md'
152153
},
153154
fixable: null,
154155
schema: []

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ module.exports = {
6161
meta: {
6262
docs: {
6363
description: 'disallow confusing `v-for` and `v-if` on the same element',
64-
category: 'recommended'
64+
category: 'recommended',
65+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-confusing-v-for-v-if.md'
6566
},
6667
fixable: false,
6768
schema: []

lib/rules/no-dupe-keys.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ module.exports = {
4848
meta: {
4949
docs: {
5050
description: 'disallow duplication of field names',
51-
category: 'essential'
51+
category: 'essential',
52+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-dupe-keys.md'
5253
},
5354
fixable: null, // or "code" or "whitespace"
5455
schema: [

lib/rules/no-duplicate-attributes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ module.exports = {
8989
meta: {
9090
docs: {
9191
description: 'disallow duplication of attributes',
92-
category: 'essential'
92+
category: 'essential',
93+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-duplicate-attributes.md'
9394
},
9495
fixable: false,
9596

lib/rules/no-multi-spaces.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ module.exports = {
1212
meta: {
1313
docs: {
1414
description: 'disallow multiple spaces',
15-
category: 'strongly-recommended'
15+
category: 'strongly-recommended',
16+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-multi-spaces.md'
1617
},
1718
fixable: 'whitespace', // or "code" or "whitespace"
1819
schema: []

lib/rules/no-parsing-error.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ module.exports = {
9494
meta: {
9595
docs: {
9696
description: 'disallow parsing errors in `<template>`',
97-
category: 'essential'
97+
category: 'essential',
98+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-parsing-error.md'
9899
},
99100
fixable: false,
100101
schema: [

lib/rules/no-reserved-keys.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ module.exports = {
5050
meta: {
5151
docs: {
5252
description: 'disallow overwriting reserved keys',
53-
category: 'essential'
53+
category: 'essential',
54+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-reserved-keys.md'
5455
},
5556
fixable: null,
5657
schema: [

lib/rules/no-shared-component-data.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ module.exports = {
7575
meta: {
7676
docs: {
7777
description: "enforce component's data property to be a function",
78-
category: 'essential'
78+
category: 'essential',
79+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-shared-component-data.md'
7980
},
8081
fixable: 'code',
8182
schema: []

lib/rules/no-side-effects-in-computed-properties.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ module.exports = {
6464
meta: {
6565
docs: {
6666
description: 'disallow side effects in computed properties',
67-
category: 'essential'
67+
category: 'essential',
68+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-side-effects-in-computed-properties.md'
6869
},
6970
fixable: null,
7071
schema: []

lib/rules/no-template-key.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ module.exports = {
4444
meta: {
4545
docs: {
4646
description: 'disallow `key` attribute on `<template>`',
47-
category: 'essential'
47+
category: 'essential',
48+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-template-key.md'
4849
},
4950
fixable: false,
5051
schema: []

lib/rules/no-textarea-mustache.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ module.exports = {
4646
meta: {
4747
docs: {
4848
description: 'disallow mustaches in `<textarea>`',
49-
category: 'essential'
49+
category: 'essential',
50+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-textarea-mustache.md'
5051
},
5152
fixable: false,
5253
schema: []

lib/rules/no-unused-vars.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ module.exports = {
4343
meta: {
4444
docs: {
4545
description: 'disallow unused variable definitions of v-for directives or scope attributes',
46-
category: 'essential'
46+
category: 'essential',
47+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-unused-vars.md'
4748
},
4849
fixable: null,
4950
schema: []

lib/rules/order-in-components.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ module.exports = {
100100
meta: {
101101
docs: {
102102
description: 'enforce order of properties in components',
103-
category: 'recommended'
103+
category: 'recommended',
104+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/order-in-components.md'
104105
},
105106
fixable: null,
106107
schema: [

lib/rules/require-component-is.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ module.exports = {
4444
meta: {
4545
docs: {
4646
description: 'require `v-bind:is` of `<component>` elements',
47-
category: 'essential'
47+
category: 'essential',
48+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/require-component-is.md'
4849
},
4950
fixable: false,
5051
schema: []

lib/rules/require-default-prop.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ module.exports = {
1414
meta: {
1515
docs: {
1616
description: 'require default value for props',
17-
category: 'strongly-recommended'
17+
category: 'strongly-recommended',
18+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/require-default-prop.md'
1819
},
1920
fixable: null, // or "code" or "whitespace"
2021
schema: []

lib/rules/require-prop-types.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ module.exports = {
8383
meta: {
8484
docs: {
8585
description: 'require type definitions in props',
86-
category: 'strongly-recommended'
86+
category: 'strongly-recommended',
87+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/require-prop-types.md'
8788
},
8889
fixable: null, // or "code" or "whitespace"
8990
schema: [

lib/rules/require-render-return.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ module.exports = {
4444
meta: {
4545
docs: {
4646
description: 'enforce render function to always return value',
47-
category: 'essential'
47+
category: 'essential',
48+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/require-render-return.md'
4849
},
4950
fixable: null, // or "code" or "whitespace"
5051
schema: []

lib/rules/require-v-for-key.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ module.exports = {
5959
meta: {
6060
docs: {
6161
description: 'require `v-bind:key` with `v-for` directives',
62-
category: 'essential'
62+
category: 'essential',
63+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/require-v-for-key.md'
6364
},
6465
fixable: false,
6566
schema: []

lib/rules/require-valid-default-prop.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ module.exports = {
2323
meta: {
2424
docs: {
2525
description: 'enforce props default values to be valid',
26-
category: 'essential'
26+
category: 'essential',
27+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/require-valid-default-prop.md'
2728
},
2829
fixable: null,
2930
schema: []

lib/rules/return-in-computed-property.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ module.exports = {
4848
meta: {
4949
docs: {
5050
description: 'enforce that a return statement is present in computed property',
51-
category: 'essential'
51+
category: 'essential',
52+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/return-in-computed-property.md'
5253
},
5354
fixable: null, // or "code" or "whitespace"
5455
schema: [

lib/rules/script-indent.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ module.exports = {
2121
meta: {
2222
docs: {
2323
description: 'enforce consistent indentation in `<script>`',
24-
category: undefined
24+
category: undefined,
25+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/script-indent.md'
2526
},
2627
fixable: 'whitespace',
2728
schema: [

lib/rules/this-in-template.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ module.exports = {
1919
meta: {
2020
docs: {
2121
description: 'enforce usage of `this` in template',
22-
category: 'recommended'
22+
category: 'recommended',
23+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/this-in-template.md'
2324
},
2425
fixable: null,
2526
schema: [

lib/rules/v-bind-style.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ module.exports = {
5353
meta: {
5454
docs: {
5555
description: 'enforce `v-bind` directive style',
56-
category: 'strongly-recommended'
56+
category: 'strongly-recommended',
57+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/v-bind-style.md'
5758
},
5859
fixable: 'code',
5960
schema: [

lib/rules/v-on-style.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ module.exports = {
5454
meta: {
5555
docs: {
5656
description: 'enforce `v-on` directive style',
57-
category: 'strongly-recommended'
57+
category: 'strongly-recommended',
58+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/v-on-style.md'
5859
},
5960
fixable: 'code',
6061
schema: [

lib/rules/valid-template-root.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ module.exports = {
113113
meta: {
114114
docs: {
115115
description: 'enforce valid template root',
116-
category: 'essential'
116+
category: 'essential',
117+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/valid-template-root.md'
117118
},
118119
fixable: false,
119120
schema: []

lib/rules/valid-v-bind.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ module.exports = {
5757
meta: {
5858
docs: {
5959
description: 'enforce valid `v-bind` directives',
60-
category: 'essential'
60+
category: 'essential',
61+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/valid-v-bind.md'
6162
},
6263
fixable: false,
6364
schema: []

lib/rules/valid-v-cloak.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ module.exports = {
5858
meta: {
5959
docs: {
6060
description: 'enforce valid `v-cloak` directives',
61-
category: 'essential'
61+
category: 'essential',
62+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/valid-v-cloak.md'
6263
},
6364
fixable: false,
6465
schema: []

lib/rules/valid-v-else-if.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ module.exports = {
8181
meta: {
8282
docs: {
8383
description: 'enforce valid `v-else-if` directives',
84-
category: 'essential'
84+
category: 'essential',
85+
url: 'https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/valid-v-else-if.md'
8586
},
8687
fixable: false,
8788
schema: []

0 commit comments

Comments
 (0)