avoid-unnecessary-super
- Group
- Style
- Path
lint/style/avoid-unnecessary-super- Default
- Off, opt in
- Origin
- Falcon
- Rule
- 174 of 512
Omit implicit super() initializers and provably redundant member prefixes.
Member checks require a final class or enum without library-local subclasses, matching resolved read/write owners, and no shadowing lexical or library binding. Open classes retain super dispatch because future subclasses can override members. Constructor checks remain available without resolution.
Invalid
class Parent { Parent(); }
class Child extends Parent {
Child() : super();
}class Child extends Parent { Child() : super();Valid
class Parent {
Parent();
Parent.named();
Parent.value(int value);
}
class Implicit extends Parent { Implicit(); }
class Named extends Parent { Named() : super.named(); }
class Argument extends Parent { Argument() : super.value(1); }Configure avoid-unnecessary-super
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"style": {
"avoid-unnecessary-super": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/style/avoid-unnecessary-super: <reason>More style rules
- avoid-unused-constructor-parameters
avoid_unused_constructor_parametersFlags constructor parameters that are never used.
- avoid-void-async
avoid_void_asyncrecommendedAvoid
asyncfunctions and methods declared to returnvoid. - avoid-wrapping-in-paddingflutter
Flags Padding directly wrapping a Flutter Container that can own the padding.
- binary-expression-operand-order
binary-expression-operand-orderFlags comparison expressions with a literal on the left-hand side.
- boolean-prefixes
boolean_prefixesFlags boolean identifiers that lack a conventional interrogative prefix.
- camel-case-extensions
camel_case_extensionsrecommendedFlags named extensions whose name is not
UpperCamelCase. - camel-case-types
camel_case_typesrecommendedFlags type names that are not
UpperCamelCase. - cast-nullable-to-non-nullable
cast_nullable_to_non_nullableFlags
e as Tcasts of a nullable value to a non-nullable type.