Based on the idea from member-ordering.
Implement a lint rule named sorting-members to enforce a consistent order of class members as specified in the configuration. This rule should support customizable member ordering and optional alphabetization.
Supported optional modifiers (must be used in the idiomatic order - below):
overridden- (fields, methods, getters/setters) - excludes static-
external- (all members) - excludes abstract-
abstract- (fields and methods) - excludes static- and late- - when not external-
static- (fields, methods, getters/setters) - when not overridden-
late- (fields only) - when not abstract- or external-
var-, final-, or const- (fields only)
nullable- (all members)
operator- (methods only)
initialized- (fields only)
const- (constructors only)
factory- (constructors only)
named- (constructors only)
redirecting- (constructors only)
public- or private- (all members)
Supported groups (required, must be last):
fields
getters
getters-setters
setters
field-getter-setter
constructors
methods
Valid config entry format:
Implement a lint rule named
sorting-membersto enforce a consistent order of class members as specified in the configuration. This rule should support customizable member ordering and optional alphabetization.Supported optional modifiers (must be used in the idiomatic order - below):
overridden-(fields, methods, getters/setters) - excludesstatic-external-(all members) - excludesabstract-abstract-(fields and methods) - excludesstatic-andlate-- when notexternal-static-(fields, methods, getters/setters) - when notoverridden-late-(fields only) - when notabstract-orexternal-var-,final-, orconst-(fields only)nullable-(all members)operator-(methods only)initialized-(fields only)const-(constructors only)factory-(constructors only)named-(constructors only)redirecting-(constructors only)public-orprivate-(all members)Supported groups (required, must be last):
fieldsgettersgetters-setterssettersfield-getter-setterconstructorsmethodsValid config entry format: