Skip to content

Commit 4b130cb

Browse files
authored
(Chore) Add related links to rules docs (#524)
1 parent b989b6d commit 4b130cb

20 files changed

+83
-8
lines changed

docs/rules/attributes-order.md

+4
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,7 @@ Specify custom order of attribute groups
115115
is="header">
116116
</div>
117117
```
118+
119+
## Related links
120+
121+
- [Style guide - Element attribute order](https://vuejs.org/v2/style-guide/#Element-attribute-order-recommended)

docs/rules/html-self-closing.md

+4
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ Every option can be set to one of the following values:
6161
<MyComponent/>
6262
<svg><path d=""/></svg>
6363
```
64+
65+
## Related links
66+
67+
- [Style guide - Self closing components](https://vuejs.org/v2/style-guide/#Self-closing-components-strongly-recommended)

docs/rules/max-attributes-per-line.md

+4
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,7 @@ Number of maximum attributes per line when a tag is in multiple lines. (Default
125125
## When Not To Use It
126126

127127
If you do not want to check the number of attributes declared per line you can disable this rule.
128+
129+
## Related links
130+
131+
- [Style guide - Multi attribute elements](https://vuejs.org/v2/style-guide/#Multi-attribute-elements-strongly-recommended)

docs/rules/name-property-casing.md

+4
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ Default casing is set to `PascalCase`.
3030
```
3131
"vue/name-property-casing": ["error", "PascalCase|kebab-case"]
3232
```
33+
34+
## Related links
35+
36+
- [Style guide - Component name casing in JS/JSX](https://vuejs.org/v2/style-guide/#Component-name-casing-in-JS-JSX-strongly-recommended)

docs/rules/no-async-in-computed-properties.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ computed: {
5555

5656
Nothing.
5757

58+
## Related links
5859

59-
[vue-async-computed]: https://github.com/foxbenjaminfox/vue-async-computed
60+
- [vue-async-computed](https://github.com/foxbenjaminfox/vue-async-computed)

docs/rules/no-confusing-v-for-v-if.md

+6
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ In that case, the `v-if` should be written on the wrapper element.
4848
## :wrench: Options
4949

5050
Nothing.
51+
52+
## Related links
53+
54+
- [Style guide - Avoid v-if with v-for](https://vuejs.org/v2/style-guide/#Avoid-v-if-with-v-for-essential)
55+
- [Guide - Conditional / v-if with v-for](https://vuejs.org/v2/guide/conditional.html#v-if-with-v-for)
56+
- [Guide - List / v-for with v-if](https://vuejs.org/v2/guide/list.html#v-for-with-v-if)

docs/rules/no-reserved-keys.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- :gear: This rule is included in all of `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
44

5-
This rule prevents to use reserved names from to avoid conflicts and unexpected behavior.
5+
This rule prevents to use [reserved names](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/utils/vue-reserved.json) to avoid conflicts and unexpected behavior.
66

77
## Rule Details
88

@@ -31,9 +31,9 @@ export default {
3131

3232
This rule has an object option:
3333

34-
`"reserved"`: [] (default) array of dissalowed names inside `groups`.
34+
`"reserved"`: [] (default) array of additional restricted attributes inside `groups`.
3535

36-
`"groups"`: [] (default) array of additional groups to search for duplicates.
36+
`"groups"`: [] (default) array of additional group names to search for duplicates in.
3737

3838
### Example:
3939

@@ -56,3 +56,7 @@ export default {
5656
}
5757
}
5858
```
59+
60+
## Related links
61+
62+
- [List of reserved keys](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/utils/vue-reserved.json)

docs/rules/no-shared-component-data.md

+4
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ export default {
5252
## :wrench: Options
5353

5454
Nothing.
55+
56+
## Related links
57+
58+
- [API - data](https://vuejs.org/v2/api/#data)

docs/rules/no-textarea-mustache.md

+4
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ This rule reports mustaches in `<textarea>`.
2525
## :wrench: Options
2626

2727
Nothing.
28+
29+
## Related links
30+
31+
- [Guide - Forms / Multiline text](https://vuejs.org/v2/guide/forms.html#Multiline-text)

docs/rules/no-use-v-if-with-v-for.md

+5
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,8 @@ computed: {
9696
/>
9797
```
9898

99+
## Related links
100+
101+
- [Style guide - Avoid v-if with v-for](https://vuejs.org/v2/style-guide/#Avoid-v-if-with-v-for-essential)
102+
- [Guide - Conditional / v-if with v-for](https://vuejs.org/v2/guide/conditional.html#v-if-with-v-for)
103+
- [Guide - List / v-for with v-if](https://vuejs.org/v2/guide/list.html#v-for-with-v-if)

docs/rules/no-v-html.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Nothing.
3232

3333
If you are certain the content passed `to v-html` is sanitized HTML you can disable this rule.
3434

35-
## Further Reading
35+
## Related links
3636

37-
* (XSS in Vue.js)[https://blog.sqreen.io/xss-in-vue-js/]
37+
- [XSS in Vue.js](https://blog.sqreen.io/xss-in-vue-js/)

docs/rules/order-in-components.md

+4
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ If you want you can change the order providing the optional configuration in you
7171
```
7272

7373
If you want some of properties to be treated equally in order you can group them into arrays, like we did with `delimiters` and `comments`.
74+
75+
## Related links
76+
77+
- [Style guide - Component/instance options order](https://vuejs.org/v2/style-guide/#Component-instance-options-order-recommended)

docs/rules/prop-name-casing.md

+4
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ Default casing is set to `camelCase`.
3535
```
3636
"vue/prop-name-casing": ["error", "camelCase|snake_case"]
3737
```
38+
39+
## Related links
40+
41+
- [Style guide - Prop name casing](https://vuejs.org/v2/style-guide/#Prop-name-casing-strongly-recommended)

docs/rules/require-component-is.md

+4
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ This rule reports the `<component>` elements which do not have `v-bind:is` attri
2727
## :wrench: Options
2828

2929
Nothing.
30+
31+
## Related links
32+
33+
- [Guide - Dynamic Components](https://vuejs.org/v2/guide/components.html#Dynamic-Components)

docs/rules/require-default-prop.md

+4
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ props: {
4141
}
4242
}
4343
```
44+
45+
## Related links
46+
47+
- [Style guide - Prop definitions](https://vuejs.org/v2/style-guide/#Prop-definitions-essential)

docs/rules/require-prop-types.md

+4
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ props: {
3737
## :wrench: Options
3838

3939
Nothing.
40+
41+
## Related links
42+
43+
- [Style guide - Prop definitions](https://vuejs.org/v2/style-guide/#Prop-definitions-essential)

docs/rules/require-v-for-key.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ Nothing.
3333

3434
## :couple: Related rules
3535

36-
- [valid-v-for]
36+
- [valid-v-for](./valid-v-for.md)
3737

38-
[valid-v-for]: ./valid-v-for.md
38+
## Related links
39+
40+
- [Style guide - Keyed v-for](https://vuejs.org/v2/style-guide/#Keyed-v-for-essential)
41+
- [Guide - v-for with a Component](https://vuejs.org/v2/guide/list.html#v-for-with-a-Component)

docs/rules/require-valid-default-prop.md

+4
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ props: {
5959
## :wrench: Options
6060

6161
Nothing.
62+
63+
## Related links
64+
65+
- [Guide - Prop Validation](https://vuejs.org/v2/guide/components-props.html#Prop-Validation)

docs/rules/v-bind-style.md

+4
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ This rule enforces `v-bind` directive style which you should use shorthand or lo
3535

3636
- `"shorthand"` (default) ... requires using shorthand.
3737
- `"longform"` ... requires using long form.
38+
39+
## Related links
40+
41+
- [Style guide - Directive shorthands](https://vuejs.org/v2/style-guide/#Directive-shorthands-strongly-recommended)

docs/rules/v-on-style.md

+4
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ This rule enforces `v-on` directive style which you should use shorthand or long
3535

3636
- `"shorthand"` (default) ... requires using shorthand.
3737
- `"longform"` ... requires using long form.
38+
39+
## Related links
40+
41+
- [Style guide - Directive shorthands](https://vuejs.org/v2/style-guide/#Directive-shorthands-strongly-recommended)

0 commit comments

Comments
 (0)