nitpick : 粗探しする、重箱の隅をつつく
only to 原形 : ただVしただけだ」ということを表します。悪い結果となってしまった場合に使うことが多いです。 特に、「only to find ~」という形で使われることが多くあります。
結局ここでは特にこの部分の意味を訳す必要は無い、ということだと思われる。
haveは「~してもらう」という意味だと思われる。
That’s the Dart analyzer spotting possible improvements in your code, called lints.
これは、Dart analyzerがあなたのコードの改善点を発見しているためです。
この機能をlintsと呼びます。
Lints are rules that your code should follow,
like best practices.
リントとは、ベストプラクティスのように、コードが従うべきルールです。
So whenever a lint is triggered, it’s telling you that the code is violating a best practice.
つまり、lintが発動するたびに、指摘されているコードがベストプラクティスに違反していることを教えてくれるのです。
A collection of predefined rules is called a rule set.
あらかじめ定義されたルールの集まりをルールセットと呼びます。
Whenever you run flutter create, your Flutter project automatically includes a package called flutter_lints, which is a predefined rule set for Flutter development.
flutter createを実行すると、Flutterプロジェクトには自動的にflutter_lintsというパッケージが含まれ、これはFlutter開発のための事前定義されたルールセットである。
This package takes Dart’s recommended rule set and builds on top of it by adding Flutter-specific rules, like making sure that you put the child property last and avoiding print statements.
このパッケージは、Dartが推奨するルールセットの上に、Flutter特有のルール(childプロパティを必ず最後に配置する、print文を避けるなど)を追加して構築しています。
Many lint rules also come with predefined fixes.
また、多くのlintルールには、あらかじめ定義された修正が付属しています。
When available, run dart fix –apply or apply the quick fix in your IDE, and Dart will automatically fix up your code so that it follows best practices.
利用可能な場合は、ターミナルでdart fix –applyコマンドを実行するか、IDEでクイックフィックスを適用すると、Dartがベストプラクティスに従うようにコードを自動的に修正します。
For a better idea of what each lint does and whether there’s a fix available, take a look at the Dart lints page.
それぞれのリントがどのような働きをするのか、また、修正方法があるのかについては、Dartのリントのページをご覧ください。
dart-lang.github.io/linter/lints
You don’t have to do anything to use flutter_lints because it’s included by default with flutter create.
flutter_lints は flutter create にデフォルトで含まれているため、何もしなくても使用できます。
But now you know that it’s always there, making sure that you follow good coding practices.
リントは常にそこにあるので、グッドコーディングプラクティスに準拠することが可能ですね。