SnowdogApps / magento2-frontools

Set of front-end tools for Magento 2 based on Gulp.js
MIT License
430 stars 142 forks source link

Drop sass-lint from the tasks #410

Closed GrimLink closed 2 years ago

GrimLink commented 3 years ago

sass-lint has been marked as UNMAINTAINED for some time now. And should be removed for stylelint with stylelint-scss instead. This combination can also lint the scss.

Also 2 lint tasks for css, seems a little bit to much. Frontools should only check if the scss is correct. And since the css made via compilation.

Igloczek commented 3 years ago

SASS lint checks mostly if the code matches code formatting and SASS good practices, but not CSS good practices, you can easily write an absolutely valid and nice-looking SASS, that will generate an awful CSS code, for example, because selectors will have a crazy high specificity or same property will be used few times in unpredictable manner and so on.

I'm not against replacing the sass-lint with something newer, but ditching the output CSS linting, is something that I'd like to avoid, because it's a powerful tool.

GrimLink commented 3 years ago

SASS lint checks mostly if the code matches code formatting and SASS good practices, but not CSS good practices, you can easily write an absolutely valid and nice-looking SASS, that will generate an awful CSS code, for example, because selectors will have a crazy high specificity or same property will be used few times in unpredictable manner and so on.

This not completely true. Yes good looking scss can create bad css. But you should avoid making bad css in the first place. That's why you use stylelint to check for both css and scss syntax in the same source.

I'm not against replacing the sass-lint with something newer, but ditching the output CSS linting, is something that I'd like to avoid, because it's a powerful

Why do you want to lint something that is part of the output of your compiler? You don't have any control on. Except via changing the source. That is at the moment not being checked for css errors.

Anyway you can still support both use cases with stylelint. And check both the scss and css files with 2 separate config files. Keeping the current setup. And only replacing 1 tool for more config.