Stylelint multiline comments rule


Stylelint multiline comments rule



Today we use style validation with the sass-lint module, but we're migrating to stylelint.



One of the validations that sass-lint does in our projects is not allowing multi-line comments but allow one-line comments.



I need to know if there is any way to apply rule similar to stylelint.



Example:


<style lang="scss" scoped>
/* several lines comments should not be allowed */
$cor: #fff;

.test {
color: $cor;
font-size: 10px;
z-index: 99;
}
</style>



The comment in the above block should be consisted of stylelint, just as it is in sass-lint.



code gif illustration




1 Answer
1



I need to know if there is any way to apply rule similar to stylelint.



There is no equivalent rule in stylelint.



However, stylelint is extensible via its plugin system. You can create a plugin for your specific use case. You'll find examples of working with non-standard comments within the double-slash rules in the stylelint-scss plugin pack.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Opening a url is failing in Swift

Export result set on Dbeaver to CSV