From dcba1720938cd794cd732654b3146a6a1fc1c582 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Tue, 26 Apr 2022 04:48:27 -0700 Subject: [PATCH] Fix end positions for `property-no-unknown` (#6039) --- lib/rules/property-no-unknown/__tests__/index.js | 10 ++++++++++ lib/rules/property-no-unknown/index.js | 1 + 2 files changed, 11 insertions(+) diff --git a/lib/rules/property-no-unknown/__tests__/index.js b/lib/rules/property-no-unknown/__tests__/index.js index 1071aaa1fa..62736625b1 100644 --- a/lib/rules/property-no-unknown/__tests__/index.js +++ b/lib/rules/property-no-unknown/__tests__/index.js @@ -46,30 +46,40 @@ testRule({ message: messages.rejected('colr'), line: 1, column: 8, + endLine: 1, + endColumn: 12, }, { code: '.foo { COLR: blue; }', message: messages.rejected('COLR'), line: 1, column: 8, + endLine: 1, + endColumn: 12, }, { code: '.foo {\n colr: blue;\n}', message: messages.rejected('colr'), line: 2, column: 3, + endLine: 2, + endColumn: 7, }, { code: '.foo { *wdth: 100px; }', message: messages.rejected('wdth'), line: 1, column: 8, + endLine: 1, + endColumn: 12, }, { code: ':export { my-property: red; }', message: messages.rejected('my-property'), line: 1, column: 11, + endLine: 1, + endColumn: 22, }, ], }); diff --git a/lib/rules/property-no-unknown/index.js b/lib/rules/property-no-unknown/index.js index 094ec2c780..5acc46b626 100644 --- a/lib/rules/property-no-unknown/index.js +++ b/lib/rules/property-no-unknown/index.js @@ -107,6 +107,7 @@ const rule = (primary, secondaryOptions) => { node: decl, result, ruleName, + word: prop, }); } };