chore(mobile): lint (#16182)

* lint - convert path to lowercase for finding index

* update dcm lint rules

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2025-02-18 21:04:19 +05:30 committed by GitHub
parent f1b98d5f45
commit 70d08a2b2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 59 additions and 28 deletions

View file

@ -1,5 +1,5 @@
import 'package:analyzer/error/listener.dart';
import 'package:analyzer/error/error.dart' show ErrorSeverity;
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
// ignore: depend_on_referenced_packages
import 'package:glob/glob.dart';
@ -65,7 +65,8 @@ class ImportRule extends DartLintRule {
) {
if (_rootOffset == -1) {
const project = "/immich/mobile/";
_rootOffset = resolver.path.indexOf(project) + project.length;
_rootOffset =
resolver.path.toLowerCase().indexOf(project) + project.length;
}
final path = resolver.path.substring(_rootOffset);