You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Static members should precede all instance members.
The constructor, if it exists, should be placed directly after any static members.
Instance members should be placed directly after the constructor, if it exists.
Getters must be placed immediately before the corresponding setter
Backing fields must be placed immediately after the getter in the case when there's no setter, or after the setter in the case when it's present.
Otherwise, members should generally be located close to where they're being used. This is difficult to enforce via linting, and so we deal with this in code review.
The text was updated successfully, but these errors were encountered:
The following project doesn't have enough options to enforce our property ordering rules, however, it can likely be forked and modified slightly:
https://www.npmjs.com/package/eslint-plugin-sort-class-members
The official rules are:
Otherwise, members should generally be located close to where they're being used. This is difficult to enforce via linting, and so we deal with this in code review.
The text was updated successfully, but these errors were encountered: