Skip to content

Commit 2442945

Browse files
authored
Merge branch 'master' into master
2 parents fc27b8e + 6dad5c2 commit 2442945

File tree

272 files changed

+3704
-2066
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+3704
-2066
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898

9999
lint:
100100
docker:
101-
- image: node:14
101+
- image: node:16
102102
steps:
103103
- run:
104104
name: Versions

.eslintignore

-12
This file was deleted.

.eslintrc.js

-181
This file was deleted.

.markdownlint.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
line-length: false
2+
link-fragments: false
23
single-title: false
34
no-inline-html:
45
allowed_elements:

.vscode/settings.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"editor.tabSize": 2,
3-
"eslint.options": {
4-
"rulePaths": ["eslint-internal-rules"]
5-
},
3+
"eslint.experimental.useFlatConfig": true,
64
"eslint.validate": [
75
"javascript",
86
"javascriptreact",
@@ -16,4 +14,8 @@
1614
"editor.formatOnSave": true,
1715
"editor.defaultFormatter": "esbenp.prettier-vscode"
1816
},
17+
"[javascript]": {
18+
"editor.formatOnSave": true,
19+
"editor.defaultFormatter": "esbenp.prettier-vscode"
20+
},
1921
}

docs/rules/experimental-script-setup-vars.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ since: v7.0.0
99

1010
> prevent variables defined in `<script setup>` to be marked as undefined
1111
12-
- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0.
12+
- :no_entry: This rule was **removed** in eslint-plugin-vue v9.0.0.
1313

1414
This rule will find variables defined in `<script setup="args">` and mark them as defined variables.
1515

docs/rules/index.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Rules in this category are enabled for all presets provided by eslint-plugin-vue
8787
| [vue/no-unused-components](./no-unused-components.md) | disallow registering components that are not used inside templates | | :three::two::hammer: |
8888
| [vue/no-unused-vars](./no-unused-vars.md) | disallow unused variable definitions of v-for directives or scope attributes | :bulb: | :three::two::hammer: |
8989
| [vue/no-use-computed-property-like-method](./no-use-computed-property-like-method.md) | disallow use computed property like method | | :three::two::warning: |
90-
| [vue/no-use-v-if-with-v-for](./no-use-v-if-with-v-for.md) | disallow use v-if on the same element as v-for | | :three::two::hammer: |
90+
| [vue/no-use-v-if-with-v-for](./no-use-v-if-with-v-for.md) | disallow using `v-if` on the same element as `v-for` | | :three::two::hammer: |
9191
| [vue/no-useless-template-attributes](./no-useless-template-attributes.md) | disallow useless attribute on `<template>` | | :three::two::warning: |
9292
| [vue/no-v-for-template-key-on-child](./no-v-for-template-key-on-child.md) | disallow key of `<template v-for>` placed on child elements | | :three::warning: |
9393
| [vue/no-v-for-template-key](./no-v-for-template-key.md) | disallow `key` attribute on `<template v-for>` | | :two::warning: |
@@ -226,6 +226,7 @@ For example:
226226
| [vue/next-tick-style](./next-tick-style.md) | enforce Promise or callback style in `nextTick` | :wrench: | :hammer: |
227227
| [vue/no-bare-strings-in-template](./no-bare-strings-in-template.md) | disallow the use of bare strings in `<template>` | | :hammer: |
228228
| [vue/no-boolean-default](./no-boolean-default.md) | disallow boolean defaults | :wrench: | :hammer: |
229+
| [vue/no-deprecated-model-definition](./no-deprecated-model-definition.md) | disallow deprecated `model` definition (in Vue.js 3.0.0+) | :bulb: | :warning: |
229230
| [vue/no-duplicate-attr-inheritance](./no-duplicate-attr-inheritance.md) | enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"` | | :hammer: |
230231
| [vue/no-empty-component-block](./no-empty-component-block.md) | disallow the `<template>` `<script>` `<style>` block to be empty | | :hammer: |
231232
| [vue/no-multiple-objects-in-class](./no-multiple-objects-in-class.md) | disallow to pass multiple objects into array to class | | :hammer: |
@@ -251,6 +252,7 @@ For example:
251252
| [vue/no-unsupported-features](./no-unsupported-features.md) | disallow unsupported Vue.js syntax on the specified version | :wrench: | :hammer: |
252253
| [vue/no-unused-properties](./no-unused-properties.md) | disallow unused properties | | :hammer: |
253254
| [vue/no-unused-refs](./no-unused-refs.md) | disallow unused refs | | :hammer: |
255+
| [vue/no-use-v-else-with-v-for](./no-use-v-else-with-v-for.md) | disallow using `v-else-if`/`v-else` on the same element as `v-for` | | :hammer: |
254256
| [vue/no-useless-mustaches](./no-useless-mustaches.md) | disallow unnecessary mustache interpolations | :wrench: | :hammer: |
255257
| [vue/no-useless-v-bind](./no-useless-v-bind.md) | disallow unnecessary `v-bind` directives | :wrench: | :hammer: |
256258
| [vue/no-v-text](./no-v-text.md) | disallow use of v-text | | :hammer: |
@@ -267,6 +269,7 @@ For example:
267269
| [vue/require-macro-variable-name](./require-macro-variable-name.md) | require a certain macro variable name | :bulb: | :hammer: |
268270
| [vue/require-name-property](./require-name-property.md) | require a name property in Vue components | :bulb: | :hammer: |
269271
| [vue/require-prop-comment](./require-prop-comment.md) | require props to have a comment | | :hammer: |
272+
| [vue/require-typed-object-prop](./require-typed-object-prop.md) | enforce adding type declarations to object props | :bulb: | :hammer: |
270273
| [vue/require-typed-ref](./require-typed-ref.md) | require `ref` and `shallowRef` functions to be strongly typed | | :hammer: |
271274
| [vue/script-indent](./script-indent.md) | enforce consistent indentation in `<script>` | :wrench: | :lipstick: |
272275
| [vue/sort-keys](./sort-keys.md) | enforce sort-keys in a manner that is compatible with order-in-components | | :hammer: |
@@ -328,7 +331,7 @@ The following rules extend the rules provided by ESLint itself and apply them to
328331

329332
## Deprecated
330333

331-
- :warning: We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
334+
- :no_entry_sign: We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
332335
- :innocent: We don't fix bugs which are in deprecated rules since we don't have enough resources.
333336

334337
| Rule ID | Replaced by |
@@ -339,7 +342,7 @@ The following rules extend the rules provided by ESLint itself and apply them to
339342

340343
## Removed
341344

342-
- :no_entry_sign: These rules have been removed in a previous major release, after they have been deprecated for a while.
345+
- :no_entry: These rules have been removed in a previous major release, after they have been deprecated for a while.
343346

344347
| Rule ID | Replaced by | Deprecated in version | Removed in version |
345348
|:--------|:------------|:-----------------------|:-------------------|

docs/rules/name-property-casing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ since: v3.8.0
99

1010
> enforce specific casing for the name property in Vue components
1111
12-
- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0 and replaced by [vue/component-definition-name-casing](component-definition-name-casing.md) rule.
12+
- :no_entry: This rule was **removed** in eslint-plugin-vue v9.0.0 and replaced by [vue/component-definition-name-casing](component-definition-name-casing.md) rule.
1313

1414
## :book: Rule Details
1515

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ since: v3.0.0
99

1010
> disallow confusing `v-for` and `v-if` on the same element
1111
12-
- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0 and replaced by [vue/no-use-v-if-with-v-for](no-use-v-if-with-v-for.md) rule.
12+
- :no_entry: This rule was **removed** in eslint-plugin-vue v9.0.0 and replaced by [vue/no-use-v-if-with-v-for](no-use-v-if-with-v-for.md) rule.
1313

1414
## :book: Rule Details
1515

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
pageClass: rule-details
3+
sidebarDepth: 0
4+
title: vue/no-deprecated-model-definition
5+
description: disallow deprecated `model` definition (in Vue.js 3.0.0+)
6+
---
7+
# vue/no-deprecated-model-definition
8+
9+
> disallow deprecated `model` definition (in Vue.js 3.0.0+)
10+
11+
- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge>
12+
- :bulb: Some problems reported by this rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
13+
14+
## :book: Rule Details
15+
16+
This rule reports use of the component `model` option, which has been deprecated in Vue.js 3.0.0+.
17+
18+
See [Migration Guide – `v-model`](https://v3-migration.vuejs.org/breaking-changes/v-model.html) for more details.
19+
20+
<eslint-code-block :rules="{'vue/no-deprecated-model-definition': ['error']}">
21+
22+
```vue
23+
<script>
24+
export default defineComponent({
25+
model: {
26+
prop: 'my-value',
27+
event: 'input'
28+
}
29+
})
30+
</script>
31+
```
32+
33+
</eslint-code-block>
34+
35+
## :wrench: Options
36+
37+
```json
38+
{
39+
"vue/no-deprecated-model-definition": ["error", {
40+
"allowVue3Compat": true
41+
}]
42+
}
43+
```
44+
45+
### `"allowVue3Compat": true`
46+
47+
Allow `model` definitions with prop/event names that match the Vue.js 3.0.0+ `v-model` syntax, e.g. `fooBar`/`update:fooBar`.
48+
49+
<eslint-code-block :rules="{'vue/no-deprecated-model-definition': ['error', { allowVue3Compat: true }]}">
50+
51+
```vue
52+
<script>
53+
export default defineComponent({
54+
model: {
55+
prop: 'fooBar',
56+
event: 'update:fooBar'
57+
}
58+
})
59+
</script>
60+
```
61+
62+
</eslint-code-block>
63+
64+
## :couple: Related Rules
65+
66+
- [vue/valid-model-definition](./valid-model-definition.md) (for Vue.js 2.x)
67+
- [vue/no-v-model-argument](./no-v-model-argument.md) (for Vue.js 2.x)
68+
69+
## :books: Further Reading
70+
71+
- [Migration Guide – `v-model`](https://v3-migration.vuejs.org/breaking-changes/v-model.html)
72+
73+
## :mag: Implementation
74+
75+
- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/no-deprecated-model-definition.js)
76+
- [Test source](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/no-deprecated-model-definition.js)

docs/rules/no-invalid-model-keys.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ since: v7.9.0
99

1010
> require valid keys in model option
1111
12-
- :warning: This rule was **deprecated** and replaced by [vue/valid-model-definition](valid-model-definition.md) rule.
12+
- :no_entry_sign: This rule was **deprecated** and replaced by [vue/valid-model-definition](valid-model-definition.md) rule.
1313

1414
## :book: Rule Details
1515

0 commit comments

Comments
 (0)