Skip to content

Rename require-v-if-inside-transition rule to require-toggle-inside-transition #1105

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 1 commit into from
May 10, 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
2 changes: 1 addition & 1 deletion docs/rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| [vue/require-component-is](./require-component-is.md) | require `v-bind:is` of `<component>` elements | |
| [vue/require-prop-type-constructor](./require-prop-type-constructor.md) | require prop type to be a constructor | :wrench: |
| [vue/require-render-return](./require-render-return.md) | enforce render function to always return value | |
| [vue/require-toggle-inside-transition](./require-toggle-inside-transition.md) | require control the display of the content inside `<transition>` | |
| [vue/require-v-for-key](./require-v-for-key.md) | require `v-bind:key` with `v-for` directives | |
| [vue/require-v-if-inside-transition](./require-v-if-inside-transition.md) | require control the display of the content inside `<transition>` | |
| [vue/require-valid-default-prop](./require-valid-default-prop.md) | enforce props default values to be valid | |
| [vue/return-in-computed-property](./return-in-computed-property.md) | enforce that a return statement is present in computed property | |
| [vue/use-v-on-exact](./use-v-on-exact.md) | enforce usage of `exact` modifier on `v-on` | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
pageClass: rule-details
sidebarDepth: 0
title: vue/require-v-if-inside-transition
title: vue/require-toggle-inside-transition
description: require control the display of the content inside `<transition>`
---
# vue/require-v-if-inside-transition
# vue/require-toggle-inside-transition
> require control the display of the content inside `<transition>`

- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
Expand All @@ -13,7 +13,7 @@ description: require control the display of the content inside `<transition>`

This rule reports elements inside `<transition>` that do not control the display.

<eslint-code-block :rules="{'vue/require-v-if-inside-transition': ['error']}">
<eslint-code-block :rules="{'vue/require-toggle-inside-transition': ['error']}">

```vue
<template>
Expand All @@ -38,5 +38,5 @@ Nothing.

## :mag: Implementation

- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/require-v-if-inside-transition.js)
- [Test source](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/require-v-if-inside-transition.js)
- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/require-toggle-inside-transition.js)
- [Test source](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/require-toggle-inside-transition.js)
2 changes: 1 addition & 1 deletion lib/configs/vue3-essential.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ module.exports = {
'vue/require-component-is': 'error',
'vue/require-prop-type-constructor': 'error',
'vue/require-render-return': 'error',
'vue/require-toggle-inside-transition': 'error',
'vue/require-v-for-key': 'error',
'vue/require-v-if-inside-transition': 'error',
'vue/require-valid-default-prop': 'error',
'vue/return-in-computed-property': 'error',
'vue/use-v-on-exact': 'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ module.exports = {
'require-prop-type-constructor': require('./rules/require-prop-type-constructor'),
'require-prop-types': require('./rules/require-prop-types'),
'require-render-return': require('./rules/require-render-return'),
'require-toggle-inside-transition': require('./rules/require-toggle-inside-transition'),
'require-v-for-key': require('./rules/require-v-for-key'),
'require-v-if-inside-transition': require('./rules/require-v-if-inside-transition'),
'require-valid-default-prop': require('./rules/require-valid-default-prop'),
'return-in-computed-property': require('./rules/return-in-computed-property'),
'script-indent': require('./rules/script-indent'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
docs: {
description: 'require control the display of the content inside `<transition>`',
categories: ['vue3-essential'],
url: 'https://eslint.vuejs.org/rules/require-v-if-inside-transition.html'
url: 'https://eslint.vuejs.org/rules/require-toggle-inside-transition.html'
},
fixable: null,
schema: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// ------------------------------------------------------------------------------

const RuleTester = require('eslint').RuleTester
const rule = require('../../../lib/rules/require-v-if-inside-transition')
const rule = require('../../../lib/rules/require-toggle-inside-transition')

// ------------------------------------------------------------------------------
// Tests
Expand All @@ -20,7 +20,7 @@ const tester = new RuleTester({
parserOptions: { ecmaVersion: 2015 }
})

tester.run('require-v-if-inside-transition', rule, {
tester.run('require-toggle-inside-transition', rule, {
valid: [
{
filename: 'test.vue',
Expand Down