stylelint-no-unused-selectors icon indicating copy to clipboard operation
stylelint-no-unused-selectors copied to clipboard

fix: run asynchronous processing outside of walkRules

Open 3846masa opened this issue 2 years ago • 0 comments

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

3846masa avatar Jun 06 '22 07:06 3846masa