Skip to content

Commit

Permalink
upgrade to use flutter lint instead of lints
Browse files Browse the repository at this point in the history
  • Loading branch information
pitabwire committed May 14, 2024
1 parent a1b2465 commit aeb6acc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 34 deletions.
31 changes: 1 addition & 30 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
include: package:flutter_lints/flutter.yaml
4 changes: 3 additions & 1 deletion example/xid_example.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'dart:developer';

import 'package:xid/xid.dart';

void main() {
var xid = Xid();
print('generated id: $xid');
log('generated id: $xid');
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ environment:
sdk: ^2.14.4

dev_dependencies:
lints: ^4.0.0
flutter_lints: ^4.0.0
test: ^1.16.0

4 changes: 2 additions & 2 deletions test/xid_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void main() {
0x2d,
0xc9
];
final idString = "9m4e2mr0ui3e8a215n4g";
const idString = "9m4e2mr0ui3e8a215n4g";
test('Encoding works well', () {
expect(base32encode(idBytes), idString.toUpperCase());
expect(Xid.fromString(idString).toBytes(), idBytes);
Expand All @@ -42,7 +42,7 @@ void main() {
0x2d,
0xc9
];
final decodeIdString = "9m4e2mr0ui3e8a215n4g";
const decodeIdString = "9m4e2mr0ui3e8a215n4g";

test('Decoding works well', () {
expect(base32decode(decodeIdString), decodeIdBytes);
Expand Down

0 comments on commit aeb6acc

Please sign in to comment.