Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSS linter to gulp tasks #797

Open
alexweissman opened this issue Oct 4, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@alexweissman
Copy link
Member

commented Oct 4, 2017

It's possible to write malformed CSS that can be properly interpreted by most browsers, but will cause problems when passed through the minification process. As a result, you can end up with styling that worked fine in development, but fails in production.

Adding a CSS linter to the build pipeline would ensure that problems like this are flagged, rather than silently breaking styling when you deploy malformed CSS.

@splitt3r

This comment has been minimized.

Copy link
Collaborator

commented Oct 21, 2017

We should add https://scrutinizer-ci.com/ to lint js, css and php at once 💪

@alexweissman

This comment has been minimized.

Copy link
Member Author

commented Oct 26, 2017

Is this something we can easily integrate into GitHub?

@splitt3r

This comment has been minimized.

Copy link
Collaborator

commented Oct 26, 2017

You only have to register and add the repository. It checks the code on every commit / pr etc. just like Travis does with the builds.

@Silic0nS0ldier

This comment has been minimized.

Copy link
Member

commented Mar 17, 2019

Having some service to lint this project as a whole would be a good idea however the benefits would be limited to us.

I've been thinking about this for some time now, and I think the best solution here would be allowing custom scripts in each sprinkle. Work done for 4.2 (common frontend dependencies location, much like how we resolve backend dependencies via composer to a common location) opens up node_modules as a safe location to have in a sprinkle.

In terms of linting CSS the thought process is that we have a default linter that can be run, but allow individual to override this with their own.

I'd like to see this expanded with a few build hooks to better facilitate more complex build process in time, that however will be much more complex as dev debug mode will need to be considered. Before something this complex could even be attempted, caching (#938) would need to be implemented first. This is best discussed in another issue, but the goal would be supporting custom frontends that use React, Vue, etc which have seen a surge in popularity. V5 will provide first class support, but we may as well support it in UF4.X is we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.