csstools / postcss-nesting

Nest style rules inside each other

Home Page:https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throw error on invalid code

JohnBabenko opened this issue · comments

commented

Hello! In the documentation, I did not find how to throw an error if the code is not valid.

Example, there is no ampersand near the button tag:

.wrapper {
  button {
    display: flex;
  }
}

But package still build invalid code :(
How about implementing this functionality?

This plugin won’t throw on that code, and will instead ignore it. This is because some authors may include other plugins that accept the syntax. If linting is desired, use a stylelint plugin.