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
Add Dart linters to the packages #561
Comments
Hi @tenhobi 👋 I’ll definitely take a look at how effective_dart compares with pedantic and hopefully add one 👍. Thanks for bringing this up! |
Btw. also check https://github.com/dart-lang/linter/tree/master/example and https://github.com/dart-lang/linter#usage for more info. (btw. as for now, effective dart repo is also mentioned there) 🙂 |
Awesome, I’ll try to take a look today 👍 |
@tenhobi can you go over the differences between |
Basically, You can check the diff of https://github.com/tenhobi/effective_dart/blob/master/lib/analysis_options.1.0.0.yaml and https://github.com/dart-lang/pedantic/blob/master/lib/analysis_options.1.8.0.yaml. The Effective Dart is the ideal state – the guide describes what you should do and don't do (and avoid, prefer, or concider) in your Dart project. Or this is how I understand it. I like using the effective dart guide and I feel no real limitations. |
@tenhobi thanks for the clarification 👍 I want to evaluate what the implications (if any) would be tomorrow (flying back from vacation 😛) and then can quickly make the updates if everything looks good. Thanks! |
Sure, check both styles and evaluate. You can also easily see what lints are used using http://dart-lang.github.io/linter/lints/ page. Tho I will add support for showing effective_dart tomorrow (tenhobi/effective_dart#1). Wow, flying from vacation and you did so much last days! |
Haha I tried to do what I can here and there on my phone 😛 |
I missed this issue, only saw it today. I would like to say thanks to @felangel and all. I recently also added But now they do. So no one will ever get again the warnings I got! Yaaay! |
@bernaferrari it might not be an issue in general. Lints provides also (opinionated) styles how you write your code. And the official samples might follow a different set of rules, for some reason. But it is a good idea to follow some set of rules for sure, to keep your project in one style. Check https://github.com/tenhobi/effective_dart for Effective Dart rules. :-) |
None of the packages uses lints in it's
analysis_options.yaml
file. (Except Angular which does have a few.)My propose is to add more linters, so the code could easilly follow the same standards.
Maybe you know the
package:pedantic
Google internally uses as lints list. A few days ago I have made thepackage:effective_dart
(https://github.com/tenhobi/effective_dart) which follows the Effecive Dart guide's lints, which I believe is suitable for our purpose.Alternatively, we can make our own list, but the Effective Dart guide provides a good set of rule, I believe.
The text was updated successfully, but these errors were encountered: