Skip to content

Commit

Permalink
Report warnings if they weren't fixed by autofix in `properties-alpha…
Browse files Browse the repository at this point in the history
…betical-order` (#195)

Fixes #115

Co-authored-by: Szymon Małolepszy <szymon.malolepszy@softwareplant.com>
  • Loading branch information
Astrael1 and Szymon Małolepszy authored Oct 7, 2024
1 parent 3a6ece9 commit 416d00c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions rules/properties-alphabetical-order/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export function rule(actual, options, context = {}) {
if (isRuleWithNodes(node)) {
if (context.fix) {
sortNodeProperties(node, { order: 'alphabetical' });

// log warnings if any problems weren't fixed
checkNode(node, result, ruleName, messages);
} else {
checkNode(node, result, ruleName, messages);
}
Expand Down
6 changes: 0 additions & 6 deletions rules/properties-alphabetical-order/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ testRule({
message: messages.expected('color', 'top'),
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/115
skip: true,
code: `
const Component = styled.div\`
top: 0;
Expand All @@ -218,8 +216,6 @@ testRule({
message: messages.expected('color', 'top'),
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/115
skip: true,
code: `
const Component = styled.div\`
top: 0;
Expand All @@ -236,8 +232,6 @@ testRule({
message: messages.expected('color', 'top'),
},
{
// blocked by https://github.com/hudochenkov/stylelint-order/issues/115
skip: true,
code: `
const Component = styled.div\`
color: tomato;
Expand Down

0 comments on commit 416d00c

Please sign in to comment.