-
Notifications
You must be signed in to change notification settings - Fork 11
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
Linting #61
Comments
Martin, this is fantastic stuff.
|
Thanks! It's really gratifying that you approve of what I've done.
Good. As I get to know bits of it, I could submit linted versions from time to time. However, I would prefer to begin doing that after you have done two or three files. That exercise might lead you to adjust the rules, and then what I did would have to be redone. Can you find time for that :-p ?
I was going to suggest we follow the Meteor Style Guide. Hah! They don't refer to quote handling at all, and worse, they use both single and double in one 10 line code fragment.
I don't see myself tackling that anytime soon. Sorry.
I'm not sure what you understood me to mean by that point. Those seven lint rules each refer to a known practice to avoid. The defence is simply having esLint catch you doing it, rather than some bizarre failure in the future.
Great! Like I said, I prefer to hold fire on any more work on this until you have settled down with a rule set you can live with.
Yeah, and I need to focus on my presentation for next month.
Whatever you like better. I don't anticipate committing any more for a couple of weeks.
I understand the concern, but I am pretty much a Node n00B, so I can't help much. Installing Bunyan is only really necessary for piping output to a more normal looking log. The HUGE advantage of bunyan is to be able to stream JSON fornat logs into permanent storage. Which raises the question of Kadira. It seems to be the Meteor way of doing things. Should we look at that, maybe? |
No problem. Slow and steady wins the race. ;) Linting and logging are fairly big contributions, in of themselves. I feel like I've tried a half-dozen linters and loggers over the years; but they've been very early releases, I didn't have a utility like starrynight I could roll them into, editor support was iffy, etc. That being said, I have a good feeling about the timing being right and all the pieces being in place to get this established in the pipeline. So, yes, I'll find the time to settle on a linting ruleset (that will follow the AirBnB / Meteor Style Guide fairly closely), and will add some commands for linting and monitoring. Anyhow, thank you again for prodding me to upgrade the linting and logging. They're much needed features. And good luck with your presentation! |
Linting
Did you see Sashko's esLint suggestion? https://forums.meteor.com/t/eslint-configuration-for-official-mdg-style/271/5 He isn't the first I have seen recommend AirBnB's coding standard, so I think it makes sense to use it.
However, there are many little details to consider :
Maybe we should address only the boilerplate code at first. Code quality being an important aspect of Starrynight, it's self-contradictory not to ensure that the boilerplate, at least, has a consistent coding style.
The quotes vs double quotes debate rages on. AirBnB goes for single-quote. It's your choice, of course! I think it does not matter all that much which you choose, but I think choosing does matter for the StarryNight boilerplate. If someone does a global search and replace with a pattern containing a quote or double quote, the results have to be consistent, right?
Git diff leaves everyone pretty much stranded when reviewing the effects of a massive linting job on a file. You may want to think about how bad that would be &/or how to manage that. You can see it in my commit "A first try with esLint".
How is StarryNight's test coverage? If a linting exercise on a file broke something, would your tests catch it?
The main stylistic issues I have seen so far in StarryNight are :
Others are "defensive programming" defences, that make a lot of sense to me.
Can you see if there is a way to get eslint into your editor? Mine, in Sublime Text, highlights and describes all linting error and warnings. Please see this wiki page of my fork produced by running this command --
The text was updated successfully, but these errors were encountered: