member-ordering
Configuration
rslint.config.ts
Rule Details
Require a consistent member declaration order.
A consistent ordering of fields, methods and constructors can make interfaces, type literals, classes and class expressions easier to read, navigate and edit.
This rule accepts an order configuration for each of the following AST node types:
default— default ordering for all node typesclasses— ordering for class declarationsclassExpressions— ordering for class expressionsinterfaces— ordering for interface declarationstypeLiterals— ordering for type literal declarations
Examples of incorrect code for this rule with the default configuration:
Examples of correct code for this rule with the default configuration: