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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 2 additions & 1 deletion
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: [

0 commit comments

Comments
 (0)