Skip to content

Update documents #1252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Official ESLint plugin for Vue.js.
This plugin allows us to check the `<template>` and `<script>` of `.vue` files with ESLint.

- Finds syntax errors.
- Finds the wrong use of [Vue.js Directives](https://vuejs.org/v2/api/#Directives).
- Finds the violation for [Vue.js Style Guide](https://vuejs.org/v2/style-guide/).
- Finds the wrong use of [Vue.js Directives](https://v3.vuejs.org/api/directives.html).
- Finds the violation for [Vue.js Style Guide](https://v3.vuejs.org/style-guide/).

ESLint editor integrations are useful to check your code in real-time.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/array-bracket-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce consistent spacing inside array brackets

This rule is the same rule as core [array-bracket-spacing] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [array-bracket-spacing]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/arrow-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce consistent spacing before and after the arrow in arrow func

This rule is the same rule as core [arrow-spacing] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [arrow-spacing]

Expand Down
7 changes: 4 additions & 3 deletions docs/rules/attributes-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: enforce order of attributes

## :book: Rule Details

This rule aims to enforce ordering of component attributes. The default order is specified in the [Vue styleguide](https://vuejs.org/v2/style-guide/#Element-attribute-order-recommended) and is:
This rule aims to enforce ordering of component attributes. The default order is specified in the [Vue styleguide](https://v3.vuejs.org/style-guide/#element-attribute-order-recommended) and is:

- `DEFINITION`
e.g. 'is'
Expand Down Expand Up @@ -215,9 +215,10 @@ This rule aims to enforce ordering of component attributes. The default order is

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Element attribute order](https://vuejs.org/v2/style-guide/#Element-attribute-order-recommended)
- [Style guide - Element attribute order](https://v3.vuejs.org/style-guide/#element-attribute-order-recommended)
- [Style guide (for v2) - Element attribute order](https://vuejs.org/v2/style-guide/#Element-attribute-order-recommended)

## :mag: Implementation

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/block-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: disallow or enforce spaces inside of blocks after opening block and

This rule is the same rule as core [block-spacing] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [block-spacing]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/brace-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce consistent brace style for blocks

This rule is the same rule as core [brace-style] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [brace-style]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/camelcase.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: enforce camelcase naming convention

This rule is the same rule as core [camelcase] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [camelcase]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/comma-dangle.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: require or disallow trailing commas

This rule is the same rule as core [comma-dangle] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [comma-dangle]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/comma-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce consistent spacing before and after commas

This rule is the same rule as core [comma-spacing] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [comma-spacing]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/comma-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce consistent comma style

This rule is the same rule as core [comma-style] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [comma-style]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/comment-directive.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ The `eslint-disable`-like comments can include descriptions to explain why the c
Unused reports cannot be suppressed with `eslint-disable` HTML comments.
:::

## :books: Further reading
## :books: Further Reading

- [Disabling rules with inline comments]

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/component-definition-name-casing.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ Vue.component('MyComponent', {

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Component name casing in JS/JSX](https://vuejs.org/v2/style-guide/#Component-name-casing-in-JS-JSX-strongly-recommended)
- [Style guide - Component name casing in JS/JSX](https://v3.vuejs.org/style-guide/#component-name-casing-in-js-jsx-strongly-recommended)

## :mag: Implementation

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/component-name-in-template-casing.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ export default {

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Component name casing in templates](https://vuejs.org/v2/style-guide/#Component-name-casing-in-templates-strongly-recommended)
- [Style guide - Component name casing in templates](https://v3.vuejs.org/style-guide/#component-name-casing-in-templates-strongly-recommended)

## :mag: Implementation

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/component-tags-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ This rule warns about the order of the `<script>`, `<template>` & `<style>` tags

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Single-file component top-level element order](https://vuejs.org/v2/style-guide/#Single-file-component-top-level-element-order-recommended)
- [Style guide - Single-file component top-level element order](https://v3.vuejs.org/style-guide/#single-file-component-top-level-element-order-recommended)

## :mag: Implementation

Expand Down
3 changes: 2 additions & 1 deletion docs/rules/custom-event-name-casing.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ Nothing.

- [Guide - Custom Events]

[Guide - Custom Events]: https://vuejs.org/v2/guide/components-custom-events.html
[Guide - Custom Events]: https://v3.vuejs.org/guide/component-custom-events.html
[Guide (for v2) - Custom Events]: https://vuejs.org/v2/guide/components-custom-events.html

## :mag: Implementation

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/dot-location.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce consistent newlines before and after dots

This rule is the same rule as core [dot-location] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [dot-location]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/dot-notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce dot notation whenever possible

This rule is the same rule as core [dot-notation] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [dot-notation]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/eqeqeq.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: require the use of `===` and `!==`

This rule is the same rule as core [eqeqeq] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [eqeqeq]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/func-call-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: require or disallow spacing between function identifiers and their

This rule is the same rule as core [func-call-spacing] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [func-call-spacing]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-closing-bracket-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ This rule aims to enforce consistent spacing style before closing brackets `>` o

</eslint-code-block>

## :couple: Related rules
## :couple: Related Rules

- [vue/no-multi-spaces](./no-multi-spaces.md)
- [vue/html-closing-bracket-newline](./html-closing-bracket-newline.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-comment-content-newline.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ This rule will enforce consistency of line break after the `<!--` and before the

</eslint-code-block>

## :couple: Related rules
## :couple: Related Rules

- [vue/html-comment-indent](./html-comment-indent.md)
- [vue/html-comment-content-spacing](./html-comment-content-spacing.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-comment-content-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Whitespace after the `<!--` and before the `-->` makes it easier to read text in

</eslint-code-block>

## :couple: Related rules
## :couple: Related Rules

- [spaced-comment](https://eslint.org/docs/rules/spaced-comment)
- [vue/html-comment-content-newline](./html-comment-content-newline.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/rules/html-quotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ Object option:

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Quoted attribute values](https://vuejs.org/v2/style-guide/#Quoted-attribute-values-strongly-recommended)
- [Style guide - Quoted attribute values](https://v3.vuejs.org/style-guide/#Quoted-attribute-values-strongly-recommended)

## :mag: Implementation

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/html-self-closing.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ Every option can be set to one of the following values:

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Self closing components](https://vuejs.org/v2/style-guide/#Self-closing-components-strongly-recommended)
- [Style guide - Self closing components](https://v3.vuejs.org/style-guide/#Self-closing-components-strongly-recommended)

## :mag: Implementation

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/key-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce consistent spacing between keys and values in object litera

This rule is the same rule as core [key-spacing] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [key-spacing]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/keyword-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: enforce consistent spacing before and after keywords

This rule is the same rule as core [keyword-spacing] rule but it applies to the expressions in `<template>`.

## :books: Further reading
## :books: Further Reading

- [keyword-spacing]

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/match-component-file-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ export default {

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Single-file component filename casing](https://vuejs.org/v2/style-guide/#Single-file-component-filename-casing-strongly-recommended)
- [Style guide - Single-file component filename casing](https://v3.vuejs.org/style-guide/#single-file-component-filename-casing-strongly-recommended)

## :mag: Implementation

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/max-attributes-per-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ There is a configurable number of attributes that are acceptable in one-line cas

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Multi attribute elements](https://vuejs.org/v2/style-guide/#Multi-attribute-elements-strongly-recommended)
- [Style guide - Multi attribute elements](https://v3.vuejs.org/style-guide/#multi-attribute-elements-strongly-recommended)

## :mag: Implementation

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/max-len.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ var longRegExpLiteral = /this is a really really really really really long regul

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [max-len]

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/multiline-html-element-content-newline.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ This rule enforces a line break before and after the contents of a multiline ele

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [no-multiple-empty-lines]

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/name-property-casing.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ This rule aims at enforcing the style for the `name` property casing for consist

</eslint-code-block>

## :books: Further reading
## :books: Further Reading

- [Style guide - Component name casing in JS/JSX](https://vuejs.org/v2/style-guide/#Component-name-casing-in-JS-JSX-strongly-recommended)
- [Style guide - Component name casing in JS/JSX](https://v3.vuejs.org/style-guide/#component-name-casing-in-js-jsx-strongly-recommended)

## :mag: Implementation

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-arrow-functions-in-watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: disallow using arrow functions to define watcher

## :book: Rule Details

This rules disallows using arrow functions to defined watcher.The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect.([see here for more details](https://vuejs.org/v2/api/#watch))
This rules disallows using arrow functions to defined watcher.The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect.([see here for more details](https://v3.vuejs.org/api/options-data.html#watch))

<eslint-code-block :rules="{'vue/no-arrow-functions-in-watch': ['error']}">

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-async-in-computed-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {

Nothing.

## :books: Further reading
## :books: Further Reading

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

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-bare-strings-in-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ If you want to report these string literals, enable the [vue/no-useless-v-bind]
- `attributes` ... An object whose keys are tag name or patterns and value is an array of attributes to check for that tag name.
- `directives` ... An array of directive names to check literal value.

## :couple: Related rules
## :couple: Related Rules

- [vue/no-useless-v-bind]
- [vue/no-useless-mustaches]
Expand Down
10 changes: 5 additions & 5 deletions docs/rules/no-confusing-v-for-v-if.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ In that case, the `v-if` should be written on the wrapper element.
::: warning Note
When they exist on the same node, `v-for` has a higher priority than `v-if`. That means the `v-if` will be run on each iteration of the loop separately.

[https://vuejs.org/v2/guide/list.html#v-for-with-v-if](https://vuejs.org/v2/guide/list.html#v-for-with-v-if)
[https://v3.vuejs.org/guide/list.html#v-for-with-v-if](https://v3.vuejs.org/guide/list.html#v-for-with-v-if)
:::

## :wrench: Options

Nothing.

## :books: Further reading
## :books: Further Reading

- [Style guide - Avoid v-if with v-for](https://vuejs.org/v2/style-guide/#Avoid-v-if-with-v-for-essential)
- [Guide - Conditional / v-if with v-for](https://vuejs.org/v2/guide/conditional.html#v-if-with-v-for)
- [Guide - List / v-for with v-if](https://vuejs.org/v2/guide/list.html#v-for-with-v-if)
- [Style guide - Avoid v-if with v-for](https://v3.vuejs.org/style-guide/#avoid-v-if-with-v-for-essential)
- [Guide - Conditional Rendering / v-if with v-for](https://v3.vuejs.org/guide/conditional.html#v-if-with-v-for)
- [Guide - List Rendering / v-for with v-if](https://v3.vuejs.org/guide/list.html#v-for-with-v-if)

## :mag: Implementation

Expand Down
10 changes: 5 additions & 5 deletions docs/rules/no-custom-modifiers-on-v-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: disallow custom modifiers on v-model used on the component

This rule checks whether `v-model `used on the component do not have custom modifiers.

## Rule Details
## :book: Rule Details

This rule reports `v-model` directives in the following cases:

Expand All @@ -37,15 +37,15 @@ This rule reports `v-model` directives in the following cases:

</eslint-code-block>

### Options
## :wrench: Options

Nothing.

## :couple: Related rules
## :couple: Related Rules

- [valid-v-model]
- [vue/valid-v-model]

[valid-v-model]: valid-v-model.md
[vue/valid-v-model]: ./valid-v-model.md

## :mag: Implementation

Expand Down
Loading