diff --git a/docs/rules/no-mutating-props.md b/docs/rules/no-mutating-props.md new file mode 100644 index 000000000..b32d67f5b --- /dev/null +++ b/docs/rules/no-mutating-props.md @@ -0,0 +1,63 @@ +# disallow mutation of component props (vue/no-mutating-props) + +This rule reports mutation of component props. + +## Rule Details + +:-1: Examples of **incorrect** code for this rule: + +```html + + +``` + +:+1: Examples of **correct** code for this rule: + +```html + + +``` + +## :wrench: Options + +Nothing. + +## Related links + +- [Style guide - Prop Mutation - deprecated](https://vuejs.org/v2/guide/migration.html#Prop-Mutation-deprecated) diff --git a/lib/rules/no-mutating-props.js b/lib/rules/no-mutating-props.js index c06106487..5449f4a49 100644 --- a/lib/rules/no-mutating-props.js +++ b/lib/rules/no-mutating-props.js @@ -1,5 +1,5 @@ /** - * @fileoverview Check if component props are not mutated + * @fileoverview disallow mutation component props * @author 2018 Armano */ 'use strict' @@ -13,7 +13,7 @@ const utils = require('../utils') module.exports = { meta: { docs: { - description: 'disallow mutation of props', + description: 'disallow mutation of component props', category: undefined, url: 'https://github.com/vuejs/eslint-plugin-vue/blob/v5.0.0-beta.3/docs/rules/no-mutating-props.md' }, diff --git a/tests/lib/rules/no-mutating-props.js b/tests/lib/rules/no-mutating-props.js index fb3212992..40f79e081 100644 --- a/tests/lib/rules/no-mutating-props.js +++ b/tests/lib/rules/no-mutating-props.js @@ -1,5 +1,5 @@ /** - * @fileoverview Check if component props are not mutated + * @fileoverview disallow mutation of component props * @author 2018 Armano */ 'use strict'