stylelint-no-unused-selectors
stylelint-no-unused-selectors copied to clipboard
fix: run asynchronous processing outside of walkRules
In some cases, unused class names may not be detected when stylelint is running for a short time.
This problem is reproduced when the execution time of stylelint-no-unused-selectors is long compared to the execution time of stylelint.
This occurs because postcss walkRules does not wait for asynchronous processing.
In this PR, asynchronous processing is executed outside of walkRules to ensure that the process is properly awaited.
Code that reproduces the bug
https://gist.github.com/3846masa/425887e280190c572252969b81f07ec8