SimenB / stylint

Improve your Stylus code with Stylint
https://simenb.github.io/stylint/
GNU General Public License v2.0
348 stars 62 forks source link

Rules shouldn't rely on `this` #356

Open SimenB opened 7 years ago

SimenB commented 7 years ago

They should receive what they need as arguments, and return/invoke a callback with a result.

SimenB commented 7 years ago

@wojciechczerniak Getting back to this, finally.

What do you think about calling each rule with the full source instead of a single line at a time? It means every rule have to handle disable-comments (or we can strip them out before hand), but it makes it easier to reason about the state of the rule itself.

Still not sure what the best API is here.

SimenB commented 7 years ago

I'd like to release an alpha of v2 after this is done.