From 26f4c353079694584e469db7ca432bcc9a494fe3 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Tue, 16 Aug 2022 22:49:48 +0900 Subject: [PATCH] Fix `shorthand-property-no-redundant-values` message This change also add test cases for end positions. --- .../shorthand-property-no-redundant-values/__tests__/index.js | 2 ++ lib/rules/shorthand-property-no-redundant-values/index.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rules/shorthand-property-no-redundant-values/__tests__/index.js b/lib/rules/shorthand-property-no-redundant-values/__tests__/index.js index d1c22fd17b..307fc0f8eb 100644 --- a/lib/rules/shorthand-property-no-redundant-values/__tests__/index.js +++ b/lib/rules/shorthand-property-no-redundant-values/__tests__/index.js @@ -115,6 +115,8 @@ testRule({ message: messages.rejected('1px 1px', '1px'), line: 1, column: 5, + endLine: 1, + endColumn: 21, }, { code: 'a { margin: 1Px 1pX; }', diff --git a/lib/rules/shorthand-property-no-redundant-values/index.js b/lib/rules/shorthand-property-no-redundant-values/index.js index 889f2436fa..9461044ee5 100644 --- a/lib/rules/shorthand-property-no-redundant-values/index.js +++ b/lib/rules/shorthand-property-no-redundant-values/index.js @@ -12,7 +12,7 @@ const ruleName = 'shorthand-property-no-redundant-values'; const messages = ruleMessages(ruleName, { rejected: (unexpected, expected) => - `Unexpected longhand value '${unexpected}' instead of '${expected}'`, + `Unexpected longhand value "${unexpected}" instead of "${expected}"`, }); const meta = {