Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 'LintCode' is imported from both 'package:analyzer/src/dart/error/lint_codes.dart' and 'package:custom_lint_core/src/lint_codes.dart'. #11

Open
kylianSalomon opened this issue Oct 3, 2024 · 1 comment

Comments

@kylianSalomon
Copy link

Hello,

Your package seems great but I cannot start the linter because i'm constantly getting the error :

/.pub-cache/hosted/pub.dev/flutter_hooks_lint-1.2.0/lib/src/rules/hooks_avoid_nesting_rule.dart:10:24: Error: 'LintCode' is imported from both 'package:analyzer/src/dart/error/lint_codes.dart' and 'package:custom_lint_core/src/lint_codes.dart'.
  static const _code = LintCode(
                       ^^^^^^^^
/.pub-cache/hosted/pub.dev/flutter_hooks_lint-1.2.0/lib/src/rules/hooks_avoid_within_class_rule.dart:12:24: Error: 'LintCode' is imported from both 'package:analyzer/src/dart/error/lint_codes.dart' and 'package:custom_lint_core/src/lint_codes.dart'.
  static const _code = LintCode(
                       ^^^^^^^^
/.pub-cache/hosted/pub.dev/flutter_hooks_lint-1.2.0/lib/src/rules/hooks_callback_consideration_rule.dart:12:24: Error: 'LintCode' is imported from both 'package:analyzer/src/dart/error/lint_codes.dart' and 'package:custom_lint_core/src/lint_codes.dart'.
  static const _code = LintCode(
                       ^^^^^^^^
/.pub-cache/hosted/pub.dev/flutter_hooks_lint-1.2.0/lib/src/rules/hooks_extends_rule.dart:12:24: Error: 'LintCode' is imported from both 'package:analyzer/src/dart/error/lint_codes.dart' and 'package:custom_lint_core/src/lint_codes.dart'.
  static const _code = LintCode(
                       ^^^^^^^^
/.pub-cache/hosted/pub.dev/flutter_hooks_lint-1.2.0/lib/src/rules/hooks_memoized_consideration_rule.dart:11:24: Error: 'LintCode' is imported from both 'package:analyzer/src/dart/error/lint_codes.dart' and 'package:custom_lint_core/src/lint_codes.dart'.
  static const _code = LintCode(
                       ^^^^^^^^
/.pub-cache/hosted/pub.dev/flutter_hooks_lint-1.2.0/lib/src/rules/hooks_name_convention_rule.dart:12:24: Error: 'LintCode' is imported from both 'package:analyzer/src/dart/error/lint_codes.dart' and 'package:custom_lint_core/src/lint_codes.dart'.
  static const _code = LintCode(
                       ^^^^^^^^
/.pub-cache/hosted/pub.dev/flutter_hooks_lint-1.2.0/lib/src/rules/hooks_unuse_widget_rule.dart:12:24: Error: 'LintCode' is imported from both 'package:analyzer/src/dart/error/lint_codes.dart' and 'package:custom_lint_core/src/lint_codes.dart'.
  static const _code = LintCode(
                       ^^^^^^^^

It seems there is a conflict between 2 libraries.

@nikaera
Copy link
Owner

nikaera commented Oct 21, 2024

Thank you for using the flutter_hooks_lint package! 🙌 We’ve just released version v1.2.1, which includes a fix for a bug related to LintCode. We’d appreciate it if you could take a look when you have a moment! 🚶 💭 @kylianSalomon
https://pub.dev/packages/flutter_hooks_lint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants