Skip to content

Update documents #1301

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 3 commits into from
Sep 30, 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
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@

See [the official website](https://eslint.vuejs.org).

> :exclamation: Attention - this is documentation for version `7.x` :exclamation:
>
> This branch contains `eslint-plugin-vue@next` which is a pre-released `7.0`, but it's not the default version that you get with `npm install eslint-plugin-vue`. In order to install this you need to specify either `"eslint-plugin-vue": "next"` in `package.json` or do `npm install eslint-plugin-vue@next`.
>
> Please try it and report any issues that you might have encountered.
>
> If you want to check previous releases [go here](https://github.com/vuejs/eslint-plugin-vue/releases).

## :anchor: Versioning Policy

This plugin is following [Semantic Versioning](https://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
Expand Down
3 changes: 0 additions & 3 deletions docs/.vuepress/theme/index.js

This file was deleted.

77 changes: 0 additions & 77 deletions docs/.vuepress/theme/layouts/Layout.vue

This file was deleted.

4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ This plugin allows us to check the `<template>` and `<script>` of `.vue` files w

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

:::warning Status of Vue.js 3.x supports
This plugin supports the basic syntax of Vue.js 3.0, but the Vue.js 3.0 experimental features `<script setup>` and `<style vars>` are not yet supported. Follow [#1248](https://github.com/vuejs/eslint-plugin-vue/issues/1248) for more details.
:::

## :traffic_light: Versioning policy

This plugin is following [Semantic Versioning](https://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
Expand Down
2 changes: 1 addition & 1 deletion 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://v3.vuejs.org/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.js Style Guide](https://v3.vuejs.org/style-guide/#element-attribute-order-recommended) and is:

- `DEFINITION`
e.g. 'is', 'v-is'
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/match-component-file-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export default {

## :books: Further Reading

- [Style guide - Single-file component filename casing](https://v3.vuejs.org/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
3 changes: 3 additions & 0 deletions docs/rules/no-deprecated-data-object-declaration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ description: disallow using deprecated object declaration on data (in Vue.js 3.0
This rule reports use of deprecated object declaration on `data` property (in Vue.js 3.0.0+).
The different from `vue/no-shared-component-data` is the root instance being also disallowed.

See [Migration Guide - Data Option](https://v3.vuejs.org/guide/migration/data-option.html) for more details.

<eslint-code-block fix :rules="{'vue/no-deprecated-data-object-declaration': ['error']}" language="javascript" filename="example.js">

```js
Expand Down Expand Up @@ -75,6 +77,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - Data Option](https://v3.vuejs.org/guide/migration/data-option.html)
- [Vue RFCs - 0019-remove-data-object-declaration](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0019-remove-data-object-declaration.md)

## :mag: Implementation
Expand Down
3 changes: 3 additions & 0 deletions docs/rules/no-deprecated-dollar-scopedslots-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ description: disallow using deprecated `$scopedSlots` (in Vue.js 3.0.0+)

This rule reports use of deprecated `$scopedSlots`. (in Vue.js 3.0.0+).

See [Migration Guide - Slots Unification](https://v3.vuejs.org/guide/migration/slots-unification.html) for more details.

<eslint-code-block fix :rules="{'vue/no-deprecated-dollar-scopedslots-api': ['error']}">

```vue
Expand All @@ -39,6 +41,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - Slots Unification](https://v3.vuejs.org/guide/migration/slots-unification.html)
- [Vue RFCs - 0006-slots-unification](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0006-slots-unification.md)

## :mag: Implementation
Expand Down
3 changes: 3 additions & 0 deletions docs/rules/no-deprecated-events-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ description: disallow using deprecated events api (in Vue.js 3.0.0+)

This rule reports use of deprecated `$on`, `$off` `$once` api. (in Vue.js 3.0.0+).

See [Migration Guide - Events API](https://v3.vuejs.org/guide/migration/events-api.html) for more details.

<eslint-code-block :rules="{'vue/no-deprecated-events-api': ['error']}">

```vue
Expand Down Expand Up @@ -57,6 +59,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - Events API](https://v3.vuejs.org/guide/migration/events-api.html)
- [Vue RFCs - 0020-events-api-change](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0020-events-api-change.md)

## :mag: Implementation
Expand Down
5 changes: 4 additions & 1 deletion docs/rules/no-deprecated-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ description: disallow using deprecated filters syntax (in Vue.js 3.0.0+)

## :book: Rule Details

This rule reports deprecated `filters` syntax (removed in Vue.js v3.0.0+)
This rule reports deprecated `filters` syntax (removed in Vue.js v3.0.0+).

See [Migration Guide - Filters](https://v3.vuejs.org/guide/migration/filters.html) for more details.

<eslint-code-block :rules="{'vue/no-deprecated-filter': ['error']}">

Expand Down Expand Up @@ -43,6 +45,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - Filters](https://v3.vuejs.org/guide/migration/filters.html)
- [Vue RFCs - 0015-remove-filters](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0015-remove-filters.md)

## :mag: Implementation
Expand Down
5 changes: 4 additions & 1 deletion docs/rules/no-deprecated-functional-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ description: disallow using deprecated the `functional` template (in Vue.js 3.0.

## :book: Rule Details

This rule reports deprecated the `functional` template (in Vue.js 3.0.0+)
This rule reports deprecated the `functional` template (in Vue.js 3.0.0+).

See [Migration Guide - Functional Components](https://v3.vuejs.org/guide/migration/functional-components.html) for more details.

<eslint-code-block :rules="{'vue/no-deprecated-functional-template': ['error']}">

Expand All @@ -30,6 +32,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - Functional Components](https://v3.vuejs.org/guide/migration/functional-components.html)
- [Vue RFCs - 0007-functional-async-api-change](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0007-functional-async-api-change.md)
- [Guide - Functional Components](https://vuejs.org/v2/guide/render-function.html#Functional-Components)

Expand Down
5 changes: 4 additions & 1 deletion docs/rules/no-deprecated-html-element-is.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ description: disallow using deprecated the `is` attribute on HTML elements (in V

## :book: Rule Details

This rule reports deprecated the `is` attribute on HTML elements (removed in Vue.js v3.0.0+)
This rule reports deprecated the `is` attribute on HTML elements (removed in Vue.js v3.0.0+).

See [Migration Guide - Custom Elements Interop](https://v3.vuejs.org/guide/migration/custom-elements-interop.html#customized-built-in-elements) for more details.

<eslint-code-block :rules="{'vue/no-deprecated-html-element-is': ['error']}">

Expand All @@ -35,6 +37,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - Custom Elements Interop](https://v3.vuejs.org/guide/migration/custom-elements-interop.html#customized-built-in-elements)
- [Vue RFCs - 0027-custom-elements-interop](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0027-custom-elements-interop.md)

## :mag: Implementation
Expand Down
5 changes: 4 additions & 1 deletion docs/rules/no-deprecated-inline-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ description: disallow using deprecated `inline-template` attribute (in Vue.js 3.

## :book: Rule Details

This rule reports deprecated `inline-template` attributes (removed in Vue.js v3.0.0+)
This rule reports deprecated `inline-template` attributes (removed in Vue.js v3.0.0+).

See [Migration Guide - Inline Template Attribute](https://v3.vuejs.org/guide/migration/inline-template-attribute.html) for more details.

<eslint-code-block :rules="{'vue/no-deprecated-inline-template': ['error']}">

Expand All @@ -38,6 +40,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - Inline Template Attribute](https://v3.vuejs.org/guide/migration/inline-template-attribute.html)
- [Vue RFCs - 0016-remove-inline-templates](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0016-remove-inline-templates.md)

## :mag: Implementation
Expand Down
5 changes: 4 additions & 1 deletion docs/rules/no-deprecated-v-bind-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ description: disallow use of deprecated `.sync` modifier on `v-bind` directive (

## :book: Rule Details

This rule reports use of deprecated `.sync` modifier on `v-bind` directive (in Vue.js 3.0.0+)
This rule reports use of deprecated `.sync` modifier on `v-bind` directive (in Vue.js 3.0.0+).

See [Migration Guide - `v-model`](https://v3.vuejs.org/guide/migration/v-model.html) for more details.

<eslint-code-block fix :rules="{'vue/no-deprecated-v-bind-sync': ['error']}">

Expand Down Expand Up @@ -45,6 +47,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - `v-model`](https://v3.vuejs.org/guide/migration/v-model.html)
- [Vue RFCs - 0005-replace-v-bind-sync-with-v-model-argument](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0005-replace-v-bind-sync-with-v-model-argument.md)

## :mag: Implementation
Expand Down
5 changes: 4 additions & 1 deletion docs/rules/no-deprecated-v-on-number-modifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ description: disallow using deprecated number (keycode) modifiers (in Vue.js 3.0

## :book: Rule Details

This rule reports use of deprecated `KeyboardEvent.keyCode` modifier on `v-on` directive (in Vue.js 3.0.0+)
This rule reports use of deprecated `KeyboardEvent.keyCode` modifier on `v-on` directive (in Vue.js 3.0.0+).

See [Migration Guide - KeyCode Modifiers](https://v3.vuejs.org/guide/migration/keycode-modifiers.html) for more details.

<eslint-code-block fix :rules="{'vue/no-deprecated-v-on-number-modifiers': ['error']}">

Expand Down Expand Up @@ -44,6 +46,7 @@ Nothing.

## :books: Further Reading

- [Migration Guide - KeyCode Modifiers](https://v3.vuejs.org/guide/migration/keycode-modifiers.html)
- [Vue RFCs - 0014-drop-keycode-support](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0014-drop-keycode-support.md)

## :mag: Implementation
Expand Down
6 changes: 5 additions & 1 deletion docs/rules/no-deprecated-vue-config-keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ description: disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+)

## :book: Rule Details

This rule reports use of deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+)
This rule reports use of deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+).

See [Migration Guide - KeyCode Modifiers](https://v3.vuejs.org/guide/migration/keycode-modifiers.html) for more details.

<eslint-code-block filename="a.js" language="javascript" :rules="{'vue/no-deprecated-vue-config-keycodes': ['error']}">

Expand All @@ -36,9 +38,11 @@ Nothing.

## :books: Further Reading

- [Migration Guide - KeyCode Modifiers]
- [Vue RFCs - 0014-drop-keycode-support]
- [API - Global Config - keyCodes]

[Migration Guide - KeyCode Modifiers]: https://v3.vuejs.org/guide/migration/keycode-modifiers.html
[Vue RFCs - 0014-drop-keycode-support]: https://github.com/vuejs/rfcs/blob/master/active-rfcs/0014-drop-keycode-support.md
[API - Global Config - keyCodes]: https://vuejs.org/v2/api/#keyCodes

Expand Down
1 change: 0 additions & 1 deletion docs/rules/no-shared-component-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Nothing.

## :books: Further Reading


- [Style guide (for v2) - Component data](https://vuejs.org/v2/style-guide/#Component-data-essential)
- [API - data](https://v3.vuejs.org/api/options-data.html#data-2)
- [API (for v2) - data](https://v3.vuejs.org/api/options-data.html#data-2)
Expand Down
6 changes: 6 additions & 0 deletions docs/rules/no-v-for-template-key-on-child.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ This rule reports the key of the `<template v-for>` placed on the child elements

In Vue.js 3.x, with the support for fragments, the `<template v-for>` key can be placed on the `<template>` tag.

See [Migration Guide - `key` attribute > With `<template v-for>`](https://v3.vuejs.org/guide/migration/key-attribute.html#with-template-v-for) for more details.

::: warning Note
Do not use with the [vue/no-v-for-template-key] rule for Vue.js 2.x.
This rule conflicts with the [vue/no-v-for-template-key] rule.
Expand Down Expand Up @@ -48,6 +50,10 @@ Nothing.

[vue/no-v-for-template-key]: ./no-v-for-template-key.md

## :books: Further Reading

- [Migration Guide - `key` attribute > With `<template v-for>`](https://v3.vuejs.org/guide/migration/key-attribute.html#with-template-v-for)

## :mag: Implementation

- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/no-v-for-template-key-on-child.js)
Expand Down
Loading