From eee044edbcdfdfa04dd1edbe25e7b2fd80c831df Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sat, 3 Jul 2021 11:10:22 +0900 Subject: [PATCH 1/2] Update `vue/no-setup-props-destructure` rule to support ` + `, + errors: [ + { + messageId: 'getProperty', + line: 4 + } + ] + }, + { + filename: 'test.vue', + code: ` + + `, + errors: [ + { + messageId: 'getProperty', + line: 4 + } + ] } ], invalid: [ @@ -428,6 +463,63 @@ tester.run('no-setup-props-destructure', rule, { line: 5 } ] + }, + { + filename: 'test.vue', + code: ` + + `, + errors: [ + { + message: + 'Destructuring the `props` will cause the value to lose reactivity.', + line: 3 + } + ] + }, + { + filename: 'test.vue', + code: ` + + `, + errors: [ + { + message: + 'Getting a value from the `props` in root scope of ` + `, + errors: [ + { + messageId: 'getProperty', + line: 4 + }, + { + messageId: 'getProperty', + line: 5 + } + ] } ] }) From 6629dac694a1ff231891bbb26623251a4bdc6a3f Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sat, 3 Jul 2021 16:25:55 +0900 Subject: [PATCH 2/2] fix test --- tests/lib/rules/no-setup-props-destructure.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/lib/rules/no-setup-props-destructure.js b/tests/lib/rules/no-setup-props-destructure.js index 006729bff..d990f8857 100644 --- a/tests/lib/rules/no-setup-props-destructure.js +++ b/tests/lib/rules/no-setup-props-destructure.js @@ -171,7 +171,12 @@ tester.run('no-setup-props-destructure', rule, { code: ` `, errors: [