First off, thank you so much for this library! This is exactly what our team was looking for, and it plays perfectly with our postcss setup.
We are experiencing a few instances of false-positives, where a class is used but it's alerted as unused. Specifically, this happens when utilize the value of a variable to reference a class (e.g., <button className={styles[buttonType]} />)
I wouldn't expect the linter to handle this case, but it would be great to be able to ignore linting errors in these circumstances. The eslint-plugin-css-modules package implements the ability to do this, but it doesn't seem that postcss-modules supports a similar concept to their markAsUsed option.
First off, thank you so much for this library! This is exactly what our team was looking for, and it plays perfectly with our postcss setup.
We are experiencing a few instances of false-positives, where a class is used but it's alerted as unused. Specifically, this happens when utilize the value of a variable to reference a class (e.g.,
<button className={styles[buttonType]} />
)I wouldn't expect the linter to handle this case, but it would be great to be able to ignore linting errors in these circumstances. The
eslint-plugin-css-modules
package implements the ability to do this, but it doesn't seem thatpostcss-modules
supports a similar concept to theirmarkAsUsed
option.