Skip to content

Commit

Permalink
docs: format docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnnnn committed Nov 19, 2023
1 parent 670de15 commit f92f5c4
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 49 deletions.
50 changes: 25 additions & 25 deletions packages/nilts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ Some of lint rules support quick fixes on IDE.
| [defined\_void\_callback\_type](#defined_void_callback_type) | Checks `void Function()` definitions. | Any versions nilts supports | Practice | Experimental | ✅️ |
| [fixed\_text\_scale\_rich\_text](#fixed_text_scale_rich_text) | Checks usage of `textScaler` or `textScaleFactor` in `RichText` constructor. | Any versions nilts supports | Practice | Experimental | ✅️ |
| [flaky\_tests\_with\_set\_up\_all](#flaky_tests_with_set_up_all) | Checks `setUpAll` usages. | Any versions nilts supports | Practice | Experimental | ✅️ |
| [no\_support\_multi\_text\_direction](#no_support_multi_text_direction) | Checks if supports `TextDirection` changes | Any versions nilts supports | Practice | Experimental | ✅️ |
| [no\_support\_multi\_text\_direction](#no_support_multi_text_direction) | Checks if supports `TextDirection` changes. | Any versions nilts supports | Practice | Experimental | ✅️ |
| [shrink\_wrapped\_scroll\_view](#shrink_wrapped_scroll_view) | Checks the content of the scroll view is shrink wrapped. | Any versions nilts supports | Practice | Experimental | ✅️ |
| [unnecessary\_rebuilds\_from\_media\_query](#unnecessary_rebuilds_from_media_query) | Checks `MediaQuery.xxxOf(context)` or `MediaQuery.maybeXxxOf(context)` usages. | >= Flutter 3.10.0 (Dart 3.0.0) | Practice | Experimental | ✅️ |

### Details

#### defined_void_callback_type

- Target SDK: Any versions nilts supports
- Rule type: Practice
- Maturity level: Experimental
- Quick fix:
- Target SDK : Any versions nilts supports
- Rule type : Practice
- Maturity level : Experimental
- Quick fix :

**Consider** replace `void Function()` with `VoidCallback` which is defined in Flutter SDK.

Expand All @@ -125,10 +125,10 @@ final VoidCallback callback;

#### fixed_text_scale_rich_text

- Target SDK: Any versions nilts supports
- Rule type: Practice
- Maturity level: Experimental
- Quick fix:
- Target SDK : Any versions nilts supports
- Rule type : Practice
- Maturity level : Experimental
- Quick fix :

**Consider** using `Text.rich` or adding `textScaler` or `textScaleFactor` (deprecated on Flutter 3.16.0 and above) argument to [RichText] constructor to make the text size responsive for user setting.

Expand Down Expand Up @@ -177,10 +177,10 @@ See also:

#### flaky_tests_with_set_up_all

- Target SDK: Any versions nilts supports
- Rule type: Practice
- Maturity level: Experimental
- Quick fix:
- Target SDK : Any versions nilts supports
- Rule type : Practice
- Maturity level : Experimental
- Quick fix :

**Consider** using `setUp` function or initialization on top level or body of test group.
`setUpAll` may cause flaky tests with concurrency executions.
Expand Down Expand Up @@ -218,10 +218,10 @@ See also:

#### no_support_multi_text_direction

- Target SDK: Any versions nilts supports
- Rule type: Practice
- Maturity level: Experimental
- Quick fix:
- Target SDK : Any versions nilts supports
- Rule type : Practice
- Maturity level : Experimental
- Quick fix :

**Consider** using `TextDirection` aware configurations if your application supports different `TextDirection` languages.

Expand Down Expand Up @@ -281,10 +281,10 @@ See also:

#### shrink_wrapped_scroll_view

- Target SDK: Any versions nilts supports
- Rule type: Practice
- Maturity level: Experimental
- Quick fix:
- Target SDK : Any versions nilts supports
- Rule type : Practice
- Maturity level : Experimental
- Quick fix :

**Consider** removing `shrinkWrap` argument and update the Widget not to shrink wrap.
Shrink wrapping the content of the scroll view is significantly more expensive than expanding to the maximum allowed size because the content can expand and contract during scrolling, which means the size of the scroll view needs to be recomputed whenever the scroll position changes.
Expand Down Expand Up @@ -312,10 +312,10 @@ See also:

#### unnecessary_rebuilds_from_media_query

- Target SDK: >= Flutter 3.10.0 (Dart 3.0.0)
- Rule type: Practice
- Maturity level: Experimental
- Quick fix:
- Target SDK : >= Flutter 3.10.0 (Dart 3.0.0)
- Rule type : Practice
- Maturity level : Experimental
- Quick fix :

**Prefer** using `MediaQuery.xxxOf` or `MediaQuery.maybeXxxOf` instead of `MediaQuery.of` or `MediaQuery.maybeOf` to avoid unnecessary rebuilds.

Expand Down
8 changes: 4 additions & 4 deletions packages/nilts/lib/src/lints/defined_void_callback_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import 'package:nilts/src/change_priority.dart';
///
/// This rule checks defining `void Function()` type.
///
/// - Target SDK: Any versions nilts supports
/// - Rule type: Practice
/// - Maturity level: Experimental
/// - Quick fix: ✅
/// - Target SDK : Any versions nilts supports
/// - Rule type : Practice
/// - Maturity level : Experimental
/// - Quick fix : ✅
///
/// **Consider** replace `void Function()` with [VoidCallback] which is defined
/// in Flutter SDK.
Expand Down
8 changes: 4 additions & 4 deletions packages/nilts/lib/src/lints/fixed_text_scale_rich_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import 'package:nilts/src/utils/library_element_ext.dart';
/// This rule checks if `textScaler` or `textScaleFactor` are missing in
/// [RichText] constructor.
///
/// - Target SDK: Any versions nilts supports
/// - Rule type: Practice
/// - Maturity level: Experimental
/// - Quick fix: ✅
/// - Target SDK : Any versions nilts supports
/// - Rule type : Practice
/// - Maturity level : Experimental
/// - Quick fix : ✅
///
/// **Consider** using `Text.rich` or adding
/// `textScaler` or `textScaleFactor` (deprecated on Flutter 3.16.0 and above)
Expand Down
8 changes: 4 additions & 4 deletions packages/nilts/lib/src/lints/flaky_tests_with_set_up_all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import 'package:nilts/src/utils/library_element_ext.dart';
///
/// This rule checks if [setUpAll] is used.
///
/// - Target SDK: Any versions nilts supports
/// - Rule type: Practice
/// - Maturity level: Experimental
/// - Quick fix: ✅
/// - Target SDK : Any versions nilts supports
/// - Rule type : Practice
/// - Maturity level : Experimental
/// - Quick fix : ✅
///
/// **Consider** using [setUp] function or
/// initialization on top level or body of test group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import 'package:nilts/src/utils/library_element_ext.dart';
///
/// This rule checks if supports `TextDirection` changes.
///
/// - Target SDK: Any versions nilts supports
/// - Rule type: Practice
/// - Maturity level: Experimental
/// - Quick fix: ✅
/// - Target SDK : Any versions nilts supports
/// - Rule type : Practice
/// - Maturity level : Experimental
/// - Quick fix : ✅
///
/// **Consider** using `TextDirection` aware configurations if your application
/// supports different `TextDirection` languages.
Expand Down
8 changes: 4 additions & 4 deletions packages/nilts/lib/src/lints/shrink_wrapped_scroll_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import 'package:nilts/src/utils/library_element_ext.dart';
///
/// This rule checks if the content of the scroll view is shrink wrapped.
///
/// - Target SDK: Any versions nilts supports
/// - Rule type: Practice
/// - Maturity level: Experimental
/// - Quick fix: ✅
/// - Target SDK : Any versions nilts supports
/// - Rule type : Practice
/// - Maturity level : Experimental
/// - Quick fix : ✅
///
/// **Consider** removing `shrinkWrap` argument and update the Widget not to
/// shrink wrap.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import 'package:nilts/src/utils/library_element_ext.dart';
/// [MediaQuery.of] or [MediaQuery.maybeOf] is used
/// instead of `MediaQuery.xxxOf` or `MediaQuery.maybeXxxOf`.
///
/// - Target SDK: >= Flutter 3.10.0 (Dart 3.0.0)
/// - Rule type: Practice
/// - Maturity level: Experimental
/// - Quick fix: ✅
/// - Target SDK : >= Flutter 3.10.0 (Dart 3.0.0)
/// - Rule type : Practice
/// - Maturity level : Experimental
/// - Quick fix : ✅
///
/// Prefer using
/// `MediaQuery.xxxOf` or `MediaQuery.maybeXxxOf`
Expand Down

0 comments on commit f92f5c4

Please sign in to comment.