linter icon indicating copy to clipboard operation
linter copied to clipboard

Linter for Dart.

Results 451 linter issues
Sort by recently updated
recently updated
newest added

In the absence of a good way to copy immutable objects with some field changes, the Flutter team often implements a `copyWith` function that copies the original object with optional...

type-enhancement
type-question
P2
set-recommended

suggest all member functions that can be `static` # example ``` class foo { void foo(String a) { print(a); } } ``` suggest: ``` class foo { static void foo(String...

type-enhancement
lint-proposal
status-pending

## unnecessary_super ## Description Don't use `super.` to refer to a member which is not overridden by the current class, just use ``. ## Details An unnecessary `super.` invocation can...

type-enhancement
lint-proposal
status-pending

It seems when the user is encountered with [cast_nullable_to_non_nullable](https://dart-lang.github.io/linter/lints/cast_nullable_to_non_nullable.html) ```dart void f(Map json) { String s = json['a'] as String; } ``` there is a tendency to write ```dart String...

type-bug
P3
false-negative
set-none

I'm proposing here that `avoid_positional_boolean_parameters` could be ignored in function-only-parameter cases. ## Bad Examples ```dart Task(true); Task(false); ListBox(false, true, true); Button(false); //New Case: Task.doSomething(object, true); ``` ## Good Examples ```dart...

type-bug
P3
false-positive
lint-proposal
status-pending

**Describe the issue** Right now this very simple pattern isn't flagged: ```dart int getAge() { final age = ageCalculator(); return age; } ``` This could be flagged and quick-fixed to:...

type-enhancement
P3

The advice in `test_types_in_equals` is: ```dart @override bool operator ==(Object other) { if (identical(this, other)) { return true; } return other is Good && this.someField == other.someField; } ``` ...however,...

type-bug
P3

## `use_of_instead_of_from` ## Description The `from` ctor on collections is more expensive. It does casts. If possible, use the `of` constructor. ## Details If the source collection has a known,...

type-enhancement
lint-proposal
status-pending

With the following code: ```dart extension type MapType._(JSObject _) implements JSObject { @JS('f') external void _f(); void Function() get f => () => _f(); } ``` a lint `unnecessary_lambdas` appears...

type-bug
P3
false-positive