kaiteki/CONTRIBUTING.md

36 lines
1 KiB
Markdown
Raw Permalink Normal View History

2024-03-06 11:17:57 -07:00
# Contributing to Kaiteki
I'm happy about any feedback or contribution you have.
Below is some guidance to what to watch out when working with Kaiteki.
## Code style
Kaiteki has no special formatting rules and follows the standard formatting provided by `dartfmt`.
Here's only one rule though, append a comma when a parameter list gets too long.
This is because Dart's formatter will format it awkwardly.
**BAD**
```dart
const User(
{required this.id,
required this.source,
required this.joinDate,
...
this.followingCount}); // Here's a comma missing
```
**GOOD**
```dart
const User({
required this.id,
required this.source,
required this.joinDate,
...
this.followingCount, // With comma the brackets format correctly.
});
```
## Check your linter problems before submitting a pull request
Kaiteki recently adopted [`flutter_lints`](https://pub.dev/packages/flutter_lints) which provides additional linting rules which show problems ranging from missed `const`s (constant values actually improve performance!) to other suggestions.