Skip to content

Commit

Permalink
chore: Use latest version altive_lints with custom_lint for all packa…
Browse files Browse the repository at this point in the history
…ges (#503)
  • Loading branch information
riscait authored Oct 10, 2024
1 parent 46784ff commit 566abf1
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 39 deletions.
3 changes: 3 additions & 0 deletions packages/convenient_widgets/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include: package:altive_lints/altive_lints.yaml
analyzer:
plugins:
- custom_lint
7 changes: 4 additions & 3 deletions packages/convenient_widgets/lib/src/apple_auth_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ class AppleAuthButton extends StatelessWidget {

@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
final isLightTheme = Theme.of(context).brightness == Brightness.light;
return ElevatedButton.icon(
return FilledButton.icon(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: isLightTheme ? Colors.black : Colors.white,
style: FilledButton.styleFrom(
backgroundColor: colorScheme.inverseSurface,
shape: StadiumBorder(
side: isLightTheme ? const BorderSide() : BorderSide.none,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class DismissibleBackground extends StatelessWidget {
const DismissibleBackground({
super.key,
required this.child,
this.backgroundColor = Colors.red,
this.backgroundColor,
this.margin = EdgeInsets.zero,
this.alignment = Alignment.centerRight,
this.borderRadius = BorderRadius.zero,
Expand All @@ -16,7 +16,7 @@ class DismissibleBackground extends StatelessWidget {
final Widget child;

/// Background color.
final Color backgroundColor;
final Color? backgroundColor;

/// Outer margins.
final EdgeInsetsGeometry margin;
Expand All @@ -34,7 +34,7 @@ class DismissibleBackground extends StatelessWidget {
margin: margin,
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: backgroundColor,
color: backgroundColor ?? Theme.of(context).colorScheme.error,
borderRadius: borderRadius,
),
child: child,
Expand Down
7 changes: 4 additions & 3 deletions packages/convenient_widgets/lib/src/google_auth_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ class GoogleAuthButton extends StatelessWidget {

@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
final isLightTheme = Theme.of(context).brightness == Brightness.light;
return ElevatedButton.icon(
return FilledButton.icon(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: isLightTheme ? Colors.black : Colors.white,
style: FilledButton.styleFrom(
backgroundColor: colorScheme.inverseSurface,
shape: StadiumBorder(
side: isLightTheme ? const BorderSide() : BorderSide.none,
),
Expand Down
3 changes: 2 additions & 1 deletion packages/convenient_widgets/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ dependencies:
simple_logger: ^1.8.0+1

dev_dependencies:
altive_lints: ^1.12.0
altive_lints: ^1.14.1
build_runner: ^2.4.9
custom_lint: ^0.6.7
flutter_gen_runner: ^5.3.1
flutter_test:
sdk: flutter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore: unused_import
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class _LivingPlace extends _$LivingPlace {
String build() => '';
}

// This is example.
// ignore: avoid_classes_with_only_static_members
class Registration {
static final nicknameProvider = _nicknameProvider;
Expand All @@ -38,6 +39,7 @@ class Registration {
// `InquiryProviders` クラスでまとめて公開する例
// -----------------------------------------------------------------------------

// This is example.
// ignore: avoid_classes_with_only_static_members
class Inquiry {
static final nameProvider = StateProvider((ref) => '');
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ packages:
dependency: "direct dev"
description:
name: altive_lints
sha256: fe13865be53b2e255c3b1e1f97e5a9bb7743f3a1b7f0b4c01573a01801217359
sha256: "957f225e9239dd1bbfb98862ba4962e1e4fa418ad202ad52e773dce6b48d7f61"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
version: "1.14.1"
analyzer:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies:
version: ^3.0.2

dev_dependencies:
altive_lints: ^1.11.1
altive_lints: ^1.14.1
build_runner: ^2.4.12
custom_lint: ^0.6.5
flutter_gen_runner: ^5.6.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore_for_file: avoid_hardcoded_japanese
import 'package:flutter_app/features/update_requester/entities/requested_version_info.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:json_annotation/json_annotation.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore_for_file: avoid_hardcoded_japanese
import 'package:flutter_app/pages/riverpod_example_page/async_notifier_provider_page/async_notifier_provider_page.dart';
import 'package:flutter_app/pages/riverpod_example_page/entities/todo.dart';
import 'package:flutter_app/pages/riverpod_example_page/util/dio_provider.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore_for_file: avoid_hardcoded_japanese
import 'dart:math';

import 'package:cloud_firestore/cloud_firestore.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore_for_file: avoid_hardcoded_japanese
import 'package:flutter_app/util/logger/provider_logger.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down
6 changes: 6 additions & 0 deletions packages/themes/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
include: package:altive_lints/altive_lints.yaml
analyzer:
plugins:
- custom_lint
custom_lint:
rules:
- avoid_hardcoded_color: false
43 changes: 28 additions & 15 deletions packages/themes/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,31 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
url: "https://pub.dev"
source: hosted
version: "67.0.0"
version: "72.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.3.2"
altive_lints:
dependency: "direct dev"
description:
name: altive_lints
sha256: bebd2b6eade5f717432ba065245bc68cd87bb50f3aa994fbeabde4663c745361
sha256: "957f225e9239dd1bbfb98862ba4962e1e4fa418ad202ad52e773dce6b48d7f61"
url: "https://pub.dev"
source: hosted
version: "1.11.1"
version: "1.14.1"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
url: "https://pub.dev"
source: hosted
version: "6.4.1"
version: "6.7.0"
analyzer_plugin:
dependency: transitive
description:
Expand Down Expand Up @@ -122,29 +127,29 @@ packages:
source: hosted
version: "3.0.5"
custom_lint:
dependency: transitive
dependency: "direct dev"
description:
name: custom_lint
sha256: "7c0aec12df22f9082146c354692056677f1e70bc43471644d1fdb36c6fdda799"
sha256: "6e1ec47427ca968f22bce734d00028ae7084361999b41673291138945c5baca0"
url: "https://pub.dev"
source: hosted
version: "0.6.4"
version: "0.6.7"
custom_lint_builder:
dependency: transitive
description:
name: custom_lint_builder
sha256: d7dc41e709dde223806660268678be7993559e523eb3164e2a1425fd6f7615a9
sha256: ba2f90fff4eff71d202d097eb14b14f87087eaaef742e956208c0eb9d3a40a21
url: "https://pub.dev"
source: hosted
version: "0.6.4"
version: "0.6.7"
custom_lint_core:
dependency: transitive
description:
name: custom_lint_core
sha256: a85e8f78f4c52f6c63cdaf8c872eb573db0231dcdf3c3a5906d493c1f8bc20e6
sha256: "4ddbbdaa774265de44c97054dcec058a83d9081d071785ece601e348c18c267d"
url: "https://pub.dev"
source: hosted
version: "0.6.3"
version: "0.6.5"
dart_style:
dependency: transitive
description:
Expand Down Expand Up @@ -251,6 +256,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
macros:
dependency: transitive
description:
name: macros
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
url: "https://pub.dev"
source: hosted
version: "0.1.2-main.4"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -311,10 +324,10 @@ packages:
dependency: transitive
description:
name: rxdart
sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
url: "https://pub.dev"
source: hosted
version: "0.27.7"
version: "0.28.0"
sky_engine:
dependency: transitive
description: flutter
Expand Down
3 changes: 2 additions & 1 deletion packages/themes/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
sdk: flutter

dev_dependencies:
altive_lints: ^1.11.1
altive_lints: ^1.14.1
custom_lint: ^0.6.7
flutter_test:
sdk: flutter
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ColorConverter implements JsonConverter<Color, int> {
const ColorConverter();

@override
// Since it is a Converter, a Color constructor is required.
// ignore: avoid_hardcoded_color
Color fromJson(int json) => Color(json);

Expand Down
2 changes: 1 addition & 1 deletion packages/util/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
shared_preferences: ^2.0.15

dev_dependencies:
altive_lints: ^1.12.0
altive_lints: ^1.14.1
custom_lint: ^0.6.7
flutter_test:
sdk: flutter
2 changes: 1 addition & 1 deletion packages/widget_catalog/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ analyzer:
linter:
rules:
# Because WidgetCatalog often does not use the public methods you define from other places.
- public_member_api_docs: false
public_member_api_docs: false
4 changes: 2 additions & 2 deletions packages/widget_catalog/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ packages:
dependency: "direct dev"
description:
name: altive_lints
sha256: fe13865be53b2e255c3b1e1f97e5a9bb7743f3a1b7f0b4c01573a01801217359
sha256: "957f225e9239dd1bbfb98862ba4962e1e4fa418ad202ad52e773dce6b48d7f61"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
version: "1.14.1"
analyzer:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/widget_catalog/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
widgetbook_annotation: ^3.2.0

dev_dependencies:
altive_lints: ^1.11.1
altive_lints: ^1.14.1
build_runner: ^2.4.12
custom_lint: ^0.6.5
widgetbook_generator: ^3.9.0
Expand Down

0 comments on commit 566abf1

Please sign in to comment.