Skip to content

Commit

Permalink
Fix end positions for property-no-unknown (#6039)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattxwang committed Apr 26, 2022
1 parent 7cc56db commit dcba172
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/rules/property-no-unknown/__tests__/index.js
Expand Up @@ -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,
},
],
});
Expand Down
1 change: 1 addition & 0 deletions lib/rules/property-no-unknown/index.js
Expand Up @@ -107,6 +107,7 @@ const rule = (primary, secondaryOptions) => {
node: decl,
result,
ruleName,
word: prop,
});
}
};
Expand Down

0 comments on commit dcba172

Please sign in to comment.