Skip to content

Commit

Permalink
Change config
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Aug 11, 2021
1 parent f6a1475 commit 795000f
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 36 deletions.
12 changes: 6 additions & 6 deletions docs/rules/README.md
Expand Up @@ -55,12 +55,14 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| [vue/no-deprecated-slot-attribute](./no-deprecated-slot-attribute.md) | disallow deprecated `slot` attribute (in Vue.js 2.6.0+) | :wrench: |
| [vue/no-deprecated-slot-scope-attribute](./no-deprecated-slot-scope-attribute.md) | disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+) | :wrench: |
| [vue/no-deprecated-v-bind-sync](./no-deprecated-v-bind-sync.md) | disallow use of deprecated `.sync` modifier on `v-bind` directive (in Vue.js 3.0.0+) | :wrench: |
| [vue/no-deprecated-v-is](./no-deprecated-v-is.md) | disallow deprecated `v-is` directive (in Vue.js 3.1.0+) | :wrench: |
| [vue/no-deprecated-v-on-native-modifier](./no-deprecated-v-on-native-modifier.md) | disallow using deprecated `.native` modifiers (in Vue.js 3.0.0+) | |
| [vue/no-deprecated-v-on-number-modifiers](./no-deprecated-v-on-number-modifiers.md) | disallow using deprecated number (keycode) modifiers (in Vue.js 3.0.0+) | :wrench: |
| [vue/no-deprecated-vue-config-keycodes](./no-deprecated-vue-config-keycodes.md) | disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+) | |
| [vue/no-dupe-keys](./no-dupe-keys.md) | disallow duplication of field names | |
| [vue/no-dupe-v-else-if](./no-dupe-v-else-if.md) | disallow duplicate conditions in `v-if` / `v-else-if` chains | |
| [vue/no-duplicate-attributes](./no-duplicate-attributes.md) | disallow duplication of attributes | |
| [vue/no-export-in-script-setup](./no-export-in-script-setup.md) | disallow `export` in `<script setup>` | |
| [vue/no-lifecycle-after-await](./no-lifecycle-after-await.md) | disallow asynchronously registered lifecycle hooks | |
| [vue/no-mutating-props](./no-mutating-props.md) | disallow mutation of component props | |
| [vue/no-parsing-error](./no-parsing-error.md) | disallow parsing errors in `<template>` | |
Expand All @@ -86,6 +88,8 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| [vue/return-in-computed-property](./return-in-computed-property.md) | enforce that a return statement is present in computed property | |
| [vue/return-in-emits-validator](./return-in-emits-validator.md) | enforce that a return statement is present in emits validator | |
| [vue/use-v-on-exact](./use-v-on-exact.md) | enforce usage of `exact` modifier on `v-on` | |
| [vue/valid-define-emits](./valid-define-emits.md) | enforce valid `defineEmits` compiler macro | |
| [vue/valid-define-props](./valid-define-props.md) | enforce valid `defineProps` compiler macro | |
| [vue/valid-template-root](./valid-template-root.md) | enforce valid template root | |
| [vue/valid-v-bind](./valid-v-bind.md) | enforce valid `v-bind` directives | |
| [vue/valid-v-cloak](./valid-v-cloak.md) | enforce valid `v-cloak` directives | |
Expand All @@ -95,6 +99,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| [vue/valid-v-html](./valid-v-html.md) | enforce valid `v-html` directives | |
| [vue/valid-v-if](./valid-v-if.md) | enforce valid `v-if` directives | |
| [vue/valid-v-is](./valid-v-is.md) | enforce valid `v-is` directives | |
| [vue/valid-v-memo](./valid-v-memo.md) | enforce valid `v-memo` directives | |
| [vue/valid-v-model](./valid-v-model.md) | enforce valid `v-model` directives | |
| [vue/valid-v-on](./valid-v-on.md) | enforce valid `v-on` directives | |
| [vue/valid-v-once](./valid-v-once.md) | enforce valid `v-once` directives | |
Expand Down Expand Up @@ -136,6 +141,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| [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: |
| [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-style](./v-on-style.md) | enforce `v-on` directive style | :wrench: |
| [vue/v-slot-style](./v-slot-style.md) | enforce `v-slot` directive style | :wrench: |

Expand Down Expand Up @@ -299,10 +305,8 @@ For example:
| [vue/next-tick-style](./next-tick-style.md) | enforce Promise or callback style in `nextTick` | :wrench: |
| [vue/no-bare-strings-in-template](./no-bare-strings-in-template.md) | disallow the use of bare strings in `<template>` | |
| [vue/no-boolean-default](./no-boolean-default.md) | disallow boolean defaults | :wrench: |
| [vue/no-deprecated-v-is](./no-deprecated-v-is.md) | disallow deprecated `v-is` directive (in Vue.js 3.1.0+) | :wrench: |
| [vue/no-duplicate-attr-inheritance](./no-duplicate-attr-inheritance.md) | enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"` | |
| [vue/no-empty-component-block](./no-empty-component-block.md) | disallow the `<template>` `<script>` `<style>` block to be empty | |
| [vue/no-export-in-script-setup](./no-export-in-script-setup.md) | disallow `export` in `<script setup>` | |
| [vue/no-invalid-model-keys](./no-invalid-model-keys.md) | require valid keys in model option | |
| [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 | |
Expand Down Expand Up @@ -333,12 +337,8 @@ 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: |
| [vue/valid-define-emits](./valid-define-emits.md) | enforce valid `defineEmits` compiler macro | |
| [vue/valid-define-props](./valid-define-props.md) | enforce valid `defineProps` compiler macro | |
| [vue/valid-next-tick](./valid-next-tick.md) | enforce valid `nextTick` function calls | :wrench: |
| [vue/valid-v-memo](./valid-v-memo.md) | enforce valid `v-memo` directives | |

### Extension Rules

Expand Down
1 change: 1 addition & 0 deletions docs/rules/no-deprecated-v-is.md
Expand Up @@ -9,6 +9,7 @@ since: v7.11.0

> disallow deprecated `v-is` directive (in Vue.js 3.1.0+)
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
- :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.

## :book: Rule Details
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/no-export-in-script-setup.md
Expand Up @@ -9,6 +9,8 @@ since: v7.13.0

> disallow `export` in `<script setup>`
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.

## :book: Rule Details

This rule warns ES module exports in `<script setup>`.
Expand Down
1 change: 1 addition & 0 deletions docs/rules/v-on-event-hyphenation.md
Expand Up @@ -9,6 +9,7 @@ since: v7.4.0

> enforce v-on event naming style on custom components in template
- :gear: This rule is included in `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
- :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.

## :book: Rule Details
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/valid-define-emits.md
Expand Up @@ -9,6 +9,8 @@ since: v7.13.0

> enforce valid `defineEmits` compiler macro
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.

This rule checks whether `defineEmits` compiler macro is valid.

## :book: Rule Details
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/valid-define-props.md
Expand Up @@ -9,6 +9,8 @@ since: v7.13.0

> enforce valid `defineProps` compiler macro
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.

This rule checks whether `defineProps` compiler macro is valid.

## :book: Rule Details
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/valid-v-memo.md
Expand Up @@ -9,6 +9,8 @@ since: v7.16.0

> enforce valid `v-memo` directives
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.

This rule checks whether every `v-memo` directive is valid.

## :book: Rule Details
Expand Down
5 changes: 5 additions & 0 deletions lib/configs/vue3-essential.js
Expand Up @@ -22,12 +22,14 @@ module.exports = {
'vue/no-deprecated-slot-attribute': 'error',
'vue/no-deprecated-slot-scope-attribute': 'error',
'vue/no-deprecated-v-bind-sync': 'error',
'vue/no-deprecated-v-is': 'error',
'vue/no-deprecated-v-on-native-modifier': 'error',
'vue/no-deprecated-v-on-number-modifiers': 'error',
'vue/no-deprecated-vue-config-keycodes': 'error',
'vue/no-dupe-keys': 'error',
'vue/no-dupe-v-else-if': 'error',
'vue/no-duplicate-attributes': 'error',
'vue/no-export-in-script-setup': 'error',
'vue/no-lifecycle-after-await': 'error',
'vue/no-mutating-props': 'error',
'vue/no-parsing-error': 'error',
Expand All @@ -53,6 +55,8 @@ module.exports = {
'vue/return-in-computed-property': 'error',
'vue/return-in-emits-validator': 'error',
'vue/use-v-on-exact': 'error',
'vue/valid-define-emits': 'error',
'vue/valid-define-props': 'error',
'vue/valid-template-root': 'error',
'vue/valid-v-bind': 'error',
'vue/valid-v-cloak': 'error',
Expand All @@ -62,6 +66,7 @@ module.exports = {
'vue/valid-v-html': 'error',
'vue/valid-v-if': 'error',
'vue/valid-v-is': 'error',
'vue/valid-v-memo': 'error',
'vue/valid-v-model': 'error',
'vue/valid-v-on': 'error',
'vue/valid-v-once': 'error',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/vue3-strongly-recommended.js
Expand Up @@ -27,6 +27,7 @@ module.exports = {
'vue/require-prop-types': 'warn',
'vue/singleline-html-element-content-newline': 'warn',
'vue/v-bind-style': 'warn',
'vue/v-on-event-hyphenation': 'warn',
'vue/v-on-style': 'warn',
'vue/v-slot-style': 'warn'
}
Expand Down
4 changes: 1 addition & 3 deletions lib/rules/no-deprecated-v-is.js
Expand Up @@ -12,9 +12,7 @@ module.exports = {
type: 'suggestion',
docs: {
description: 'disallow deprecated `v-is` directive (in Vue.js 3.1.0+)',
// TODO Switch to `vue3-essential` in the major version.
// categories: ['vue3-essential'],
categories: undefined,
categories: ['vue3-essential'],
url: 'https://eslint.vuejs.org/rules/no-deprecated-v-is.html'
},
fixable: 'code',
Expand Down
4 changes: 1 addition & 3 deletions lib/rules/no-export-in-script-setup.js
Expand Up @@ -11,9 +11,7 @@ module.exports = {
type: 'problem',
docs: {
description: 'disallow `export` in `<script setup>`',
// TODO Switch in the major version.
// categories: ['vue3-essential'],
categories: undefined,
categories: ['vue3-essential'],
url: 'https://eslint.vuejs.org/rules/no-export-in-script-setup.html'
},
fixable: null,
Expand Down
4 changes: 1 addition & 3 deletions lib/rules/v-on-event-hyphenation.js
Expand Up @@ -8,9 +8,7 @@ module.exports = {
docs: {
description:
'enforce v-on event naming style on custom components in template',
// TODO Change with major version.
// categories: ['vue3-strongly-recommended'],
categories: undefined,
categories: ['vue3-strongly-recommended'],
url: 'https://eslint.vuejs.org/rules/v-on-event-hyphenation.html'
},
fixable: 'code',
Expand Down
4 changes: 1 addition & 3 deletions lib/rules/valid-define-emits.js
Expand Up @@ -12,9 +12,7 @@ module.exports = {
type: 'problem',
docs: {
description: 'enforce valid `defineEmits` compiler macro',
// TODO Switch in the major version.
// categories: ['vue3-essential'],
categories: undefined,
categories: ['vue3-essential'],
url: 'https://eslint.vuejs.org/rules/valid-define-emits.html'
},
fixable: null,
Expand Down
4 changes: 1 addition & 3 deletions lib/rules/valid-define-props.js
Expand Up @@ -12,9 +12,7 @@ module.exports = {
type: 'problem',
docs: {
description: 'enforce valid `defineProps` compiler macro',
// TODO Switch in the major version.
// categories: ['vue3-essential'],
categories: undefined,
categories: ['vue3-essential'],
url: 'https://eslint.vuejs.org/rules/valid-define-props.html'
},
fixable: null,
Expand Down
2 changes: 0 additions & 2 deletions lib/rules/valid-v-is.js
Expand Up @@ -39,8 +39,6 @@ module.exports = {
type: 'problem',
docs: {
description: 'enforce valid `v-is` directives',
// TODO Switch to `undefined` in the major version.
// categories: undefined,
categories: ['vue3-essential'],
url: 'https://eslint.vuejs.org/rules/valid-v-is.html'
},
Expand Down
4 changes: 1 addition & 3 deletions lib/rules/valid-v-memo.js
Expand Up @@ -19,9 +19,7 @@ module.exports = {
type: 'problem',
docs: {
description: 'enforce valid `v-memo` directives',
// TODO Switch to `vue3-essential` in the major version.
// categories: ['vue3-essential'],
categories: undefined,
categories: ['vue3-essential'],
url: 'https://eslint.vuejs.org/rules/valid-v-memo.html'
},
fixable: null,
Expand Down
10 changes: 0 additions & 10 deletions tests/lib/rules/require-expose.js
Expand Up @@ -17,16 +17,6 @@ const tester = new RuleTester({

tester.run('require-expose', rule, {
valid: [
{
filename: 'ValidComponent.vue',
code: `
<script>
export default { // TODO
setup:() => function () {}
}
</script>
`
},
{
filename: 'ValidComponent.vue',
code: `
Expand Down

0 comments on commit 795000f

Please sign in to comment.