Commit 7ba55f15 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'selhorn-vue' into 'master'

Updating code blocks for better styling in docs

Closes #212395

See merge request gitlab-org/gitlab!28065
parents 39bf3d35 10868bd3
...@@ -75,7 +75,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules) ...@@ -75,7 +75,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
1. **Props Naming:** Avoid using DOM component prop names. 1. **Props Naming:** Avoid using DOM component prop names.
1. **Props Naming:** Use kebab-case instead of camelCase to provide props in templates. 1. **Props Naming:** Use kebab-case instead of camelCase to provide props in templates.
```javascript ```html
// bad // bad
<component class="btn"> <component class="btn">
...@@ -97,7 +97,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules) ...@@ -97,7 +97,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
1. With more than one attribute, all attributes should be on a new line: 1. With more than one attribute, all attributes should be on a new line:
```javascript ```html
// bad // bad
<component v-if="bar" <component v-if="bar"
param="baz" /> param="baz" />
...@@ -117,7 +117,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules) ...@@ -117,7 +117,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
1. The tag can be inline if there is only one attribute: 1. The tag can be inline if there is only one attribute:
```javascript ```html
// good // good
<component bar="bar" /> <component bar="bar" />
...@@ -238,7 +238,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules) ...@@ -238,7 +238,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
1. Shorthand `@` is preferable over `v-on` 1. Shorthand `@` is preferable over `v-on`
```javascript ```html
// bad // bad
<component v-on:click="eventHandler"/> <component v-on:click="eventHandler"/>
...@@ -248,7 +248,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules) ...@@ -248,7 +248,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
1. Shorthand `:` is preferable over `v-bind` 1. Shorthand `:` is preferable over `v-bind`
```javascript ```html
// bad // bad
<component v-bind:class="btn"/> <component v-bind:class="btn"/>
...@@ -258,7 +258,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules) ...@@ -258,7 +258,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
1. Shorthand `#` is preferable over `v-slot` 1. Shorthand `#` is preferable over `v-slot`
```javascript ```html
// bad // bad
<template v-slot:header></template> <template v-slot:header></template>
...@@ -270,7 +270,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules) ...@@ -270,7 +270,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
1. Prefer self-closing component tags 1. Prefer self-closing component tags
```javascript ```html
// bad // bad
<component></component> <component></component>
...@@ -282,7 +282,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules) ...@@ -282,7 +282,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
1. Prefer a component's kebab-cased name over other styles when using it in a template 1. Prefer a component's kebab-cased name over other styles when using it in a template
```javascript ```html
// bad // bad
<MyComponent /> <MyComponent />
...@@ -372,7 +372,7 @@ Useful links: ...@@ -372,7 +372,7 @@ Useful links:
1. Tooltips: Do not rely on `has-tooltip` class name for Vue components 1. Tooltips: Do not rely on `has-tooltip` class name for Vue components
```javascript ```html
// bad // bad
<span <span
class="has-tooltip" class="has-tooltip"
...@@ -392,7 +392,7 @@ Useful links: ...@@ -392,7 +392,7 @@ Useful links:
1. Don't change `data-original-title`. 1. Don't change `data-original-title`.
```javascript ```html
// bad // bad
<span data-original-title="tooltip text">Foo</span> <span data-original-title="tooltip text">Foo</span>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment