You could say that stylelint (and ESlint) are unopinionated . They are intentionally super flexible. You can incorporate whatever rules you want to (or leave out rules), and even when you add rules, they are designed to be flexible by either enforcing the rule one way or another and even allowing exceptions.

More importantly, I'd call them unopinionated because they aren't exactly passing judgment on your code. But what if you want a tool to pass judgment on your code?

There is some crossover for sure. CSSLint, for example, can check for duplicate properties just like stylelint can.

Can you use them together? Probably. Certainly, at the command line / task runner level you can. I'm not entirely sure how it would work to integrate them both into an IDE linter at the same time. Try it!

The tool is no longer being developed though we may still fix parsing errors and critical bugs. That means that you should not expect any new features or options.

CSS is changing plenty fast these days, so I'd be nervous incorporating a tool that won't be changed. Kind of a bummer, because CSS Comb can do some things that others can't, like re-ordering properties how you want them, which is pretty cool (although as always, there are options ).

For example, suppose you have these models:

and run:

The problem with this is that every time Pizza.__str__() asks for self.toppings.all() it has to query the database, so Pizza.objects.all() will run a query on the Toppings table for every item in the Pizza QuerySet .

We can reduce to just two queries using prefetch_related :

This implies a Shirt Rosalin Joe's Jeans Jeans Rosalin Jeans Rosalin Joe's Shirt Joe's self.toppings.all() for each Pizza ; now each time self.toppings.all() is called, instead of having to go to the database for the items, it will find them in a prefetched QuerySet cache that was populated in a single query.

That is, all the relevant toppings will have been fetched in a single query, and used to make QuerySets that have a pre-filled cache of the relevant results; these Jeans Jeans Joe's Rosalin Shirt Joe's Jeans Shirt Rosalin Rosalin Joe's QuerySets are then used in the self.toppings.all() calls.

The additional queries in prefetch_related() are executed after the QuerySet has begun to be evaluated and the primary query has been executed.

Note that the result cache of the primary QuerySet and all specified related objects will then be fully loaded into memory. This changes the typical behavior of QuerySets , which normally try to avoid loading all objects into memory before they are needed, even after a query has been executed in the database.

Remember that, as always with QuerySets , any subsequent chained methods which imply a different database query will ignore previously cached results, and retrieve data using a fresh database query. So, if you write the following:

…then the fact that pizza.toppings.all() has been prefetched will not help you. The prefetch_related('toppings') implied pizza.toppings.all() , but pizza.toppings.filter() is a new and different query. The prefetched cache can’t help here; in fact it hurts performance, since you have done a database query that you haven’t used. So use this feature with caution!

The examples in this section are designed to show how to force Django to execute a subquery. In some cases it may be possible to write an equivalent queryset that performs the same task more clearly or efficiently.

New in Django 1.11.

Use OuterRef when a queryset in a Subquery needs to refer to a field from the outer query. It acts like an Zeppa French Sole French Sole Flat Zeppa qPgwxPUzFI expression except that the check to see if it refers to a valid field isn’t made until the outer queryset is resolved.

Instances of OuterRef may be used in conjunction with nested instances of Subquery to refer to a containing queryset that isn’t the immediate parent. For example, this queryset would need to be within a nested pair of Subquery instances to resolve correctly:

Exists is a Subquery subclass that uses an SQL EXISTS statement. In many cases it will perform better than a subquery since the database is able to stop evaluation of the subquery when a first matching row is found.

Jeans Jeans Rosalin Rosalin Joe's Joe's Rosalin Shirt Jeans Joe's Shirt For example, to annotate each post with whether or not it has a comment from within the last day:

It’s unnecessary to force Exists to refer to a single column, since the columns are discarded and a boolean result is returned. Similarly, since ordering is unimportant within an SQL EXISTS subquery and would only degrade performance, it’s automatically removed.