From 5227eed7018c541614172730e6a980487818ebdb Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Mon, 19 Feb 2024 00:40:22 +0100 Subject: [PATCH 1/9] Add missing suggestions and messages to tests (#2402) --- lib/rules/require-expose.js | 1 - tests/lib/rules/define-macros-order.js | 16 +- tests/lib/rules/no-child-content.js | 36 ++- .../rules/no-required-prop-with-default.js | 20 +- tests/lib/rules/no-unused-vars.js | 13 +- .../rules/prefer-true-attribute-shorthand.js | 2 + tests/lib/rules/require-emit-validator.js | 12 +- tests/lib/rules/require-explicit-emits.js | 284 +++++++++++++++++- tests/lib/rules/require-expose.js | 3 + tests/lib/rules/valid-next-tick.js | 3 + 10 files changed, 371 insertions(+), 19 deletions(-) diff --git a/lib/rules/require-expose.js b/lib/rules/require-expose.js index 41578839e..953393e37 100644 --- a/lib/rules/require-expose.js +++ b/lib/rules/require-expose.js @@ -67,7 +67,6 @@ module.exports = { messages: { requireExpose: 'The public properties of the component must be explicitly declared using `expose`. If the component does not have public properties, declare it empty.', - addExposeOptionForEmpty: 'Add the `expose` option to give an empty array.', addExposeOptionForAll: diff --git a/tests/lib/rules/define-macros-order.js b/tests/lib/rules/define-macros-order.js index 78c3637d2..bdae34e6a 100644 --- a/tests/lib/rules/define-macros-order.js +++ b/tests/lib/rules/define-macros-order.js @@ -928,7 +928,21 @@ tester.run('define-macros-order', rule, { }, { message: defineExposeNotTheLast, - line: 6 + line: 6, + suggestions: [ + { + messageId: 'putExposeAtTheLast', + output: ` + + ` + } + ] } ] } diff --git a/tests/lib/rules/no-child-content.js b/tests/lib/rules/no-child-content.js index 2e46f6cb0..1be1e3c07 100644 --- a/tests/lib/rules/no-child-content.js +++ b/tests/lib/rules/no-child-content.js @@ -77,7 +77,10 @@ ruleTester.run('no-child-content', rule, { column: 29, endColumn: 32, suggestions: [ - { output: '' } + { + messageId: 'removeChildContent', + output: '' + } ] } ] @@ -93,7 +96,10 @@ ruleTester.run('no-child-content', rule, { column: 29, endColumn: 38, suggestions: [ - { output: '' } + { + messageId: 'removeChildContent', + output: '' + } ] } ] @@ -109,7 +115,10 @@ ruleTester.run('no-child-content', rule, { column: 29, endColumn: 37, suggestions: [ - { output: '' } + { + messageId: 'removeChildContent', + output: '' + } ] } ] @@ -125,7 +134,10 @@ ruleTester.run('no-child-content', rule, { column: 29, endColumn: 41, suggestions: [ - { output: '' } + { + messageId: 'removeChildContent', + output: '' + } ] } ] @@ -152,6 +164,7 @@ ruleTester.run('no-child-content', rule, { endColumn: 11, suggestions: [ { + messageId: 'removeChildContent', output: `