Closed aymericbouzy closed 3 years ago
@aymericbouzy Interesting rule request! I hadn't considered that before.
My quick reaction is that one might more often want their it.todo
padding to match their it
padding since then they could just remove the .todo
, implement the test, and have valid padding at that point, but I do recognize that one form is typically multiline while the other is not and I can appreciate the aesthetic difference.
Could be an interesting rule to implement since, iirc, we don't look past the first token right now.
Disclaimer I'm just a contributor. :)
@dangreenisrael @hockeybuggy thoughts?
I think having it as an option would be nice, but I won't have any time for it for at least the next 2 months.
@hockeybuggy Thoughts?
Based on @benkimpel's thoughts related to the padding being unchanged after dropping the .todo
s it seems like this would be good thing to have be opt in (this would also avoid a breaking change [if we considering rules failing to be breaking]).
Seems like it.todo
would be the only method that this would really make sense for (.each
, .only
, .skip
don't seem to make sense to have padding variations).
I think my stance is that if someone would like to contribute this, I would be in favour of including it.
As I've said in #85 I've never written an ESlint rule before, but I'm willing to try 👍
@aymericbouzy No time like the present to learn something new. I learned with this course. https://frontendmasters.com/courses/linting-asts/
Hey, I'm closing this due to a seeming lack of interest. If it can get 5 +1s I'll reopen it.
There should not be padding around todo test blocks.
Valid code example
Invalid code example
Maybe this can be an option to
padding-around-test-blocks
?