Skip to content

Commit

Permalink
Don’t report errors after applying selector-pseudo-class-focus fix (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Romanov authored and YozhikM committed Oct 23, 2019
1 parent 1f61496 commit fa89563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ global.testRule = (rule, schema) => {
const fixedCode = getOutputCss(output2);

expect(fixedCode).toBe(testCase.fixed);
expect(output2.results[0].warnings.length).toBe(0); // Ensure errors are not reported on fixed code
});
});
});
Expand Down
1 change: 1 addition & 0 deletions src/rules/selector-pseudo-class-focus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default function(actual, _, context) {
node.selector = `${node.selector}, ${node.selector.replace(/:hover/g, ':focus')}`;
}
});
return;
}

if (!isAccepted) {
Expand Down

0 comments on commit fa89563

Please sign in to comment.