Skip to content

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

@kylianSalomon

Description

@kylianSalomon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions