Skip to content

Commit

Permalink
doc: Update README with new macro documentation assists
Browse files Browse the repository at this point in the history
  • Loading branch information
naipaka committed Dec 9, 2024
1 parent 53155cc commit e7dbe49
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions packages/altive_lints/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ There are also Altive-made rules by custom_lint.
- [prefer\_dedicated\_media\_query\_methods](#prefer_dedicated_media_query_methods)
- [prefer\_to\_include\_sliver\_in\_name](#prefer_to_include_sliver_in_name)
- [prefer\_space\_between\_elements](#prefer_space_between_elements)
- [All assists in altive\_lints](#all-assists-in-altive_lints)
- [Add macro template documentation comment](#add-macro-template-documentation-comment)
- [Add macro documentation comment](#add-macro-documentation-comment)
- [Wrap with macro template documentation comment](#wrap-with-macro-template-documentation-comment)
- [Lint rules adopted by altive\_lints and why](#lint-rules-adopted-by-altive_lints-and-why)
- [public\_member\_api\_docs](#public_member_api_docs)
- [Migration guide](#migration-guide)
Expand Down Expand Up @@ -318,6 +322,81 @@ class MyWidget extends StatelessWidget {
}
```

## All assists in altive_lints

### Add macro template documentation comment

Adds a Macros template to class declarations.
When you place the cursor on the class declaration and execute **"Add macro template documentation comment"**, the documentation is created.

**Before:**

```dart
class MyClass {
// Class implementation
}
```

**After applying the assist:**

```dart
/// {@template my_package.MyClass}
///
/// {@endtemplate}
class MyClass {
// Class implementation
}
```

### Add macro documentation comment

Adds Macros comments to constructors and method declarations.
When you place the cursor on a constructor or method declaration and execute **"Add macro documentation comment"**, the documentation is created.

**Before:**

```dart
void myFunction() {
// Function implementation
}
```

**After applying the assist:**

```dart
/// {@macro my_package.myFunction}
void myFunction() {
// Function implementation
}
```

### Wrap with macro template documentation comment

Wraps existing documentation comments with a Macros template.
When you select the documentation comment and execute **"Wrap with macro template documentation comment"**, the documentation is created.

**Before:**

```dart
/// Some comment
/// More comments
class MyClass {
// Class implementation
}
```

**After applying the assist:**

```dart
/// {@template my_package.MyClass}
/// Some comment
/// More comments
/// {@endtemplate}
class MyClass {
// Class implementation
}
```

## Lint rules adopted by altive_lints and why

Reasons for adopting each lint rule.
Expand Down

0 comments on commit e7dbe49

Please sign in to comment.