diff --git a/docs/rules/require-direct-export.md b/docs/rules/require-direct-export.md index 778c66306..63d9fb19e 100644 --- a/docs/rules/require-direct-export.md +++ b/docs/rules/require-direct-export.md @@ -7,37 +7,51 @@ description: require the component to be directly exported # vue/require-direct-export > require the component to be directly exported -## Rule Details +## :book: Rule Details This rule aims to require that the component object be directly exported. -:-1: Examples of **incorrect** code: + -```js +```vue + +``` + + + + + +```vue + ``` -:+1: Examples of **correct** code: + -```js -export default { - name: 'ComponentA', - data() { - return { - state: 1 - } - } -} -``` +## :wrench: Options + +Nothing. ## :mag: Implementation diff --git a/docs/rules/v-on-function-call.md b/docs/rules/v-on-function-call.md index e684f08f9..7e858eb7f 100644 --- a/docs/rules/v-on-function-call.md +++ b/docs/rules/v-on-function-call.md @@ -11,66 +11,80 @@ description: enforce or forbid parentheses after method calls without arguments ## :book: Rule Details -:-1: Example of **incorrect** code for this rule: - -```html - +This rule aims to enforce to bind methods to `v-on` or call methods on `v-on` when without arguments. + + + +```vue + ``` -:+1: Example of **correct** code for this rule: - -```html - -``` + ## :wrench: Options Default is set to `never`. -``` -'vue/v-on-function-call': [2, 'always'|'never'] +```json +{ + "vue/v-on-function-call": ["error", "always"|"never"] +} ``` ### `"always"` - Always use parentheses in `v-on` directives -:-1: Example of **incorrect** code: + -```html - -``` +```vue + ``` + + ### `"never"` - Never use parentheses in `v-on` directives for method calls without arguments -:-1: Example of **incorrect** code: -```html - -``` + -:+1: Example of **correct** code: +```vue + ``` + + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/v-on-function-call.js)