From d0e8e47ad32617c146440cfed4e283bd5d9f4f97 Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Thu, 21 May 2020 19:56:28 +0900 Subject: [PATCH] Add `vue/no-mutating-props` rule (from #633) (#1148) * Add `no-mutating-props` rule. * update * support vue3 * delete unused function Co-authored-by: Armano --- docs/rules/README.md | 2 + docs/rules/no-mutating-props.md | 99 +++++ lib/configs/essential.js | 1 + lib/configs/vue3-essential.js | 1 + lib/index.js | 1 + lib/rules/no-mutating-props.js | 361 +++++++++++++++ lib/utils/index.js | 19 + tests/lib/rules/no-mutating-props.js | 640 +++++++++++++++++++++++++++ 8 files changed, 1124 insertions(+) create mode 100644 docs/rules/no-mutating-props.md create mode 100644 lib/rules/no-mutating-props.js create mode 100644 tests/lib/rules/no-mutating-props.js diff --git a/docs/rules/README.md b/docs/rules/README.md index e160ba03d..ecea70df7 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -56,6 +56,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi | [vue/no-dupe-keys](./no-dupe-keys.md) | disallow duplication of field names | | | [vue/no-duplicate-attributes](./no-duplicate-attributes.md) | disallow duplication of attributes | | | [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 `