Skip to content

Commit

Permalink
fix/lint-code
Browse files Browse the repository at this point in the history
  • Loading branch information
nank1ro committed Sep 17, 2024
1 parent e3bd529 commit a3deac0
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions packages/solidart_lint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.2

- Fix `LintCode` issue (thanks to @manuel-plavsic)

## 1.1.1

- Update dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/solidart_lint/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.18.0 <3.0.0"
sdk: ^3.0.0

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/error.dart' as analyzer_error;
import 'package:analyzer/error/listener.dart';
import 'package:collection/collection.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
Expand All @@ -10,7 +10,7 @@ class AvoidDynamicProvider extends DartLintRule {

static const _code = LintCode(
name: 'avoid_dynamic_provider',
errorSeverity: ErrorSeverity.ERROR,
errorSeverity: analyzer_error.ErrorSeverity.ERROR,
problemMessage: 'The Provider cannot be dynamic',
);

Expand Down Expand Up @@ -43,8 +43,8 @@ class _ProviderTypeFix extends DartFix {
CustomLintResolver resolver,
ChangeReporter reporter,
CustomLintContext context,
AnalysisError analysisError,
List<AnalysisError> others,
analyzer_error.AnalysisError analysisError,
List<analyzer_error.AnalysisError> others,
) {
context.registry.addInstanceCreationExpression(
(node) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/error.dart' as analyzer_error;
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
import 'package:solidart_lint/src/types.dart';
Expand All @@ -8,7 +8,7 @@ class InvalidObserveType extends DartLintRule {

static const _code = LintCode(
name: 'invalid_observe_type',
errorSeverity: ErrorSeverity.ERROR,
errorSeverity: analyzer_error.ErrorSeverity.ERROR,
problemMessage:
'The observe type is invalid, must not implement SignalBase',
);
Expand Down
4 changes: 2 additions & 2 deletions packages/solidart_lint/lib/src/lints/invalid_update_type.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/error.dart' as analyzer_error;
import 'package:collection/collection.dart';
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
Expand All @@ -9,7 +9,7 @@ class InvalidUpdateType extends DartLintRule {

static const _code = LintCode(
name: 'invalid_update_type',
errorSeverity: ErrorSeverity.ERROR,
errorSeverity: analyzer_error.ErrorSeverity.ERROR,
problemMessage: 'The update type is invalid, must not implement SignalBase',
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/error/error.dart' as analyzer_error;
import 'package:analyzer/error/listener.dart';
import 'package:custom_lint_builder/custom_lint_builder.dart';
import 'package:solidart_lint/src/types.dart';
Expand All @@ -9,7 +9,7 @@ class MissingSolidGetType extends DartLintRule {

static const _code = LintCode(
name: 'missing_solid_get_type',
errorSeverity: ErrorSeverity.ERROR,
errorSeverity: analyzer_error.ErrorSeverity.ERROR,
problemMessage: 'Specify the provider or signal type you want to get',
);

Expand Down
2 changes: 1 addition & 1 deletion packages/solidart_lint/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: solidart_lint
description: solidart_lint is a developer tool for users of solidart, designed to help stop common issues and simplify repetitive tasks
version: 1.1.1
version: 1.1.2
repository: https://github.com/nank1ro/solidart
documentation: https://docs.page/nank1ro/solidart
topics:
Expand Down

0 comments on commit a3deac0

Please sign in to comment.