diff --git a/.env-cmdrc b/.env-cmdrc new file mode 100644 index 000000000..59d3db357 --- /dev/null +++ b/.env-cmdrc @@ -0,0 +1,5 @@ +{ + "version": { + "IN_VERSION_SCRIPT": "true" + } +} diff --git a/docs/rules/README.md b/docs/rules/README.md index 68677d252..5f848467b 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -301,6 +301,8 @@ For example: | [vue/no-multiple-objects-in-class](./no-multiple-objects-in-class.md) | disallow to pass multiple objects into array to class | | | [vue/no-potential-component-option-typo](./no-potential-component-option-typo.md) | disallow a potential typo in your component property | | | [vue/no-reserved-component-names](./no-reserved-component-names.md) | disallow the use of reserved names in component definitions | | +| [vue/no-restricted-block](./no-restricted-block.md) | disallow specific block | | +| [vue/no-restricted-call-after-await](./no-restricted-call-after-await.md) | disallow asynchronously called restricted methods | | | [vue/no-restricted-component-options](./no-restricted-component-options.md) | disallow specific component option | | | [vue/no-restricted-custom-event](./no-restricted-custom-event.md) | disallow specific custom event | | | [vue/no-restricted-props](./no-restricted-props.md) | disallow specific props | | @@ -320,6 +322,7 @@ For example: | [vue/sort-keys](./sort-keys.md) | enforce sort-keys in a manner that is compatible with order-in-components | | | [vue/static-class-names-order](./static-class-names-order.md) | enforce static class names order | :wrench: | | [vue/v-for-delimiter-style](./v-for-delimiter-style.md) | enforce `v-for` directive's delimiter style | :wrench: | +| [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md) | enforce v-on event naming style on custom components in template | :wrench: | | [vue/v-on-function-call](./v-on-function-call.md) | enforce or forbid parentheses after method calls without arguments in `v-on` directives | :wrench: | ### Extension Rules diff --git a/docs/rules/array-bracket-newline.md b/docs/rules/array-bracket-newline.md index 2bc2a0886..4d336afd0 100644 --- a/docs/rules/array-bracket-newline.md +++ b/docs/rules/array-bracket-newline.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/array-bracket-newline description: enforce linebreaks after opening and before closing array brackets +since: v7.1.0 --- # vue/array-bracket-newline + > enforce linebreaks after opening and before closing array brackets - :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule. @@ -17,6 +19,10 @@ This rule is the same rule as core [array-bracket-newline] rule but it applies t [array-bracket-newline]: https://eslint.org/docs/rules/array-bracket-newline +## :rocket: Version + +This rule was introduced in eslint-plugin-vue v7.1.0 + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/array-bracket-newline.js) diff --git a/docs/rules/array-bracket-spacing.md b/docs/rules/array-bracket-spacing.md index 4da69b6f6..fd37f2fe3 100644 --- a/docs/rules/array-bracket-spacing.md +++ b/docs/rules/array-bracket-spacing.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/array-bracket-spacing description: enforce consistent spacing inside array brackets +since: v5.2.0 --- # vue/array-bracket-spacing + > enforce consistent spacing inside array brackets - :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule. @@ -17,6 +19,10 @@ This rule is the same rule as core [array-bracket-spacing] rule but it applies t [array-bracket-spacing]: https://eslint.org/docs/rules/array-bracket-spacing +## :rocket: Version + +This rule was introduced in eslint-plugin-vue v5.2.0 + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/array-bracket-spacing.js) diff --git a/docs/rules/arrow-spacing.md b/docs/rules/arrow-spacing.md index 0ca9c4f82..40194ae4b 100644 --- a/docs/rules/arrow-spacing.md +++ b/docs/rules/arrow-spacing.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/arrow-spacing description: enforce consistent spacing before and after the arrow in arrow functions +since: v5.2.0 --- # vue/arrow-spacing + > enforce consistent spacing before and after the arrow in arrow functions - :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule. @@ -17,6 +19,10 @@ This rule is the same rule as core [arrow-spacing] rule but it applies to the ex [arrow-spacing]: https://eslint.org/docs/rules/arrow-spacing +## :rocket: Version + +This rule was introduced in eslint-plugin-vue v5.2.0 + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/arrow-spacing.js) diff --git a/docs/rules/attribute-hyphenation.md b/docs/rules/attribute-hyphenation.md index b6a4915c2..cc6391831 100644 --- a/docs/rules/attribute-hyphenation.md +++ b/docs/rules/attribute-hyphenation.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/attribute-hyphenation description: enforce attribute naming style on custom components in template +since: v3.9.0 --- # vue/attribute-hyphenation + > enforce attribute naming style on custom components in template - :gear: This rule is included in all of `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`. @@ -45,6 +47,7 @@ Default casing is set to `always` with `['data-', 'aria-', 'slot-scope']` set to - `"ignore"` ... Array of ignored names ### `"always"` + It errors on upper case letters. @@ -62,6 +65,7 @@ It errors on upper case letters. ### `"never"` + It errors on hyphens except `data-`, `aria-` and `slot-scope`. @@ -82,6 +86,7 @@ It errors on hyphens except `data-`, `aria-` and `slot-scope`. ### `"never", { "ignore": ["custom-prop"] }` + Don't use hyphenated name but allow custom attributes @@ -102,6 +107,15 @@ Don't use hyphenated name but allow custom attributes +## :couple: Related Rules + +- [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md) +- [vue/prop-name-casing](./prop-name-casing.md) + +## :rocket: Version + +This rule was introduced in eslint-plugin-vue v3.9.0 + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/attribute-hyphenation.js) diff --git a/docs/rules/attributes-order.md b/docs/rules/attributes-order.md index ea8c4ae9c..8bcb8b8ea 100644 --- a/docs/rules/attributes-order.md +++ b/docs/rules/attributes-order.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/attributes-order description: enforce order of attributes +since: v4.3.0 --- # vue/attributes-order + > enforce order of attributes - :gear: This rule is included in `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`. @@ -89,7 +91,33 @@ This rule aims to enforce ordering of component attributes. The default order is +Note that `v-bind="object"` syntax is considered to be the same as the next or previous attribute categories. + + + +```vue + +``` + + + ## :wrench: Options + ```json { "vue/attributes-order": ["error", { @@ -111,7 +139,7 @@ This rule aims to enforce ordering of component attributes. The default order is } ``` -### `"alphabetical": true` +### `"alphabetical": true` @@ -220,6 +248,10 @@ This rule aims to enforce ordering of component attributes. The default order is - [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) +## :rocket: Version + +This rule was introduced in eslint-plugin-vue v4.3.0 + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/attributes-order.js) diff --git a/docs/rules/block-spacing.md b/docs/rules/block-spacing.md index bc6b003d6..72a4d495c 100644 --- a/docs/rules/block-spacing.md +++ b/docs/rules/block-spacing.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/block-spacing description: disallow or enforce spaces inside of blocks after opening block and before closing block +since: v5.2.0 --- # vue/block-spacing + > disallow or enforce spaces inside of blocks after opening block and before closing block - :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule. @@ -17,6 +19,10 @@ This rule is the same rule as core [block-spacing] rule but it applies to the ex [block-spacing]: https://eslint.org/docs/rules/block-spacing +## :rocket: Version + +This rule was introduced in eslint-plugin-vue v5.2.0 + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/block-spacing.js) diff --git a/docs/rules/block-tag-newline.md b/docs/rules/block-tag-newline.md index a3ab5f965..59d43a14b 100644 --- a/docs/rules/block-tag-newline.md +++ b/docs/rules/block-tag-newline.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/block-tag-newline description: enforce line breaks after opening and before closing block-level tags +since: v7.1.0 --- # vue/block-tag-newline + > enforce line breaks after opening and before closing block-level tags - :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule. @@ -155,6 +157,10 @@ export default { +## :rocket: Version + +This rule was introduced in eslint-plugin-vue v7.1.0 + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/block-tag-newline.js) diff --git a/docs/rules/brace-style.md b/docs/rules/brace-style.md index 7ef57cd85..99bf8e0ce 100644 --- a/docs/rules/brace-style.md +++ b/docs/rules/brace-style.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/brace-style description: enforce consistent brace style for blocks +since: v5.2.0 --- # vue/brace-style + > enforce consistent brace style for blocks - :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule. @@ -17,6 +19,10 @@ This rule is the same rule as core [brace-style] rule but it applies to the expr [brace-style]: https://eslint.org/docs/rules/brace-style +## :rocket: Version + +This rule was introduced in eslint-plugin-vue v5.2.0 + ## :mag: Implementation - [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/brace-style.js) diff --git a/docs/rules/camelcase.md b/docs/rules/camelcase.md index b52fcefd8..2ee39bdcc 100644 --- a/docs/rules/camelcase.md +++ b/docs/rules/camelcase.md @@ -3,8 +3,10 @@ pageClass: rule-details sidebarDepth: 0 title: vue/camelcase description: enforce camelcase naming convention +since: v5.2.0 --- # vue/camelcase + > enforce camelcase naming convention This rule is the same rule as core [camelcase] rule but it applies to the expressions in `