-
Notifications
You must be signed in to change notification settings - Fork 529
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
Look at ESLint #1
Comments
I have some experience in this area. Long story short you need to parse the source file into an AST tree . This produces a data structure which we can easily compare our rules against. First things first we'll need a parser. There unfortunate aren't many parsers for Sass outside of the language implementations. I've been meaning to write one for a while now. The one I am aware of is https://www.npmjs.com/package/gonzales-pe. It might also be worth looking to if/how scss-list is generating it's AST tree. |
Yah; I've played a little bit with lexers and parsers (but totally forgot about them without Googling!) Good to see that's the path I should be on! I've found https://github.com/floby/node-parser, https://github.com/shfx/node-lexer, and https://github.com/aaditmshah/lexer (which looks the most promising to me). One question think about; do we want this to be a strict port of |
I'd opt for the latter. Taking the ESLint approach of plugable rules is the mecca IMHO. |
Okay, good. We should change the name then so there isn't confusion. Maybe |
I'm not sure how to approach this. I personally wanted to focus on the |
Oh, fully agree focus on |
Sass lint? |
Ah yeah, I meant to add I wanted to avoid potentially confusion, but maybe that's not an issue. Most people probably associate sass with .scss. |
I know I do. I'm going to go with that. If for no other reason than |
👍 |
I say we go lower case. Capital case is really awkward to me. |
Yah, it's lower case |
The repo is currently |
Doh! |
🍰 🎉 |
Closed in favor of #2 |
So, I have no idea how to write a linter, but I think this should probably be based off of ESLint, so I'm going to do that.
The text was updated successfully, but these errors were encountered: