Skip to content

Commit

Permalink
Change category of vue/require-explicit-emits rule to `vue3-strongl…
Browse files Browse the repository at this point in the history
…y-recommended`. (#1251)

This is also recommended in the official guide.
https://v3.vuejs.org/guide/component-custom-events.html#defining-custom-events
  • Loading branch information
ota-meshi committed Jul 19, 2020
1 parent d4cd35e commit 7ef7de8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| [vue/one-component-per-file](./one-component-per-file.md) | enforce that each component should be in its own file | |
| [vue/prop-name-casing](./prop-name-casing.md) | enforce specific casing for the Prop name in Vue components | |
| [vue/require-default-prop](./require-default-prop.md) | require default value for props | |
| [vue/require-explicit-emits](./require-explicit-emits.md) | require `emits` option with name triggered by `$emit()` | |
| [vue/require-prop-types](./require-prop-types.md) | require type definitions in props | |
| [vue/singleline-html-element-content-newline](./singleline-html-element-content-newline.md) | require a line break before and after the contents of a singleline element | :wrench: |
| [vue/v-bind-style](./v-bind-style.md) | enforce `v-bind` directive style | :wrench: |
Expand Down Expand Up @@ -306,7 +307,6 @@ For example:
| [vue/no-useless-v-bind](./no-useless-v-bind.md) | disallow unnecessary `v-bind` directives | :wrench: |
| [vue/padding-line-between-blocks](./padding-line-between-blocks.md) | require or disallow padding lines between blocks | :wrench: |
| [vue/require-direct-export](./require-direct-export.md) | require the component to be directly exported | |
| [vue/require-explicit-emits](./require-explicit-emits.md) | require `emits` option with name triggered by `$emit()` | |
| [vue/require-name-property](./require-name-property.md) | require a name property in Vue components | |
| [vue/script-indent](./script-indent.md) | enforce consistent indentation in `<script>` | :wrench: |
| [vue/sort-keys](./sort-keys.md) | enforce sort-keys in a manner that is compatible with order-in-components | |
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/require-explicit-emits.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: require `emits` option with name triggered by `$emit()`
# vue/require-explicit-emits
> require `emits` option with name triggered by `$emit()`
- :gear: This rule is included in `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.

## :book: Rule Details

This rule reports event triggers not declared with the `emits` option. (The `emits` option is a new in Vue.js 3.0.0+)
Expand Down
1 change: 1 addition & 0 deletions lib/configs/vue3-strongly-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
'vue/one-component-per-file': 'warn',
'vue/prop-name-casing': 'warn',
'vue/require-default-prop': 'warn',
'vue/require-explicit-emits': 'warn',
'vue/require-prop-types': 'warn',
'vue/singleline-html-element-content-newline': 'warn',
'vue/v-bind-style': 'warn',
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-explicit-emits.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module.exports = {
type: 'suggestion',
docs: {
description: 'require `emits` option with name triggered by `$emit()`',
categories: undefined,
categories: ['vue3-strongly-recommended'],
url: 'https://eslint.vuejs.org/rules/require-explicit-emits.html'
},
fixable: null,
Expand Down

0 comments on commit 7ef7de8

Please sign in to comment.