Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Support ignoring rules outside of TTL #64

Closed
emilgoldsmith opened this issue Jul 8, 2017 · 2 comments · Fixed by #67
Closed

Support ignoring rules outside of TTL #64

emilgoldsmith opened this issue Jul 8, 2017 · 2 comments · Fixed by #67

Comments

@emilgoldsmith
Copy link
Member

I know we closed #56, but I thought about it a bit and I think I could add support for it pretty simply.

You just use the already implemented babylon parser and then every time you hit a comment outside a TTL you check if it fits /stylelint-(?:enable|disable)/ if it does you add it to an array, and every time you encounter a TTL you inject all the comments you pushed to the array to the top of the TTL to be parsed, in that way it will also support someone later using stylelint-enable. This should handle all cases from the docs as we of course could just ignore stylelint-disable-(?:next-)?line as those should only be used within.

I think it would be quite a nice intuitive addition. I of course think so because I thought it would intuitively work like eslint, and I could see why others would think the same.

I'll probably submit a PR in the near future adding this in.

@ghost
Copy link

ghost commented Jul 9, 2017

@emilgoldsmith Hey, just wanted to let you know that I'm currently traveling, but I'll take a look at the pr's and issues asap.

@emilgoldsmith
Copy link
Member Author

@ismay no problem! Enjoy your travels, take your time :).

And thanks for the heads up, appreciate it :).

mxstbr added a commit that referenced this issue Jul 15, 2017
…g-rules-outside-TTL

Support ignoring rules outside of TTL
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant