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
Squiz/FunctionDeclarationArgumentSpacing: handle modifiers for constructor property promotion
The spacing after visibility/`readonly` modifiers for constructor property promotion were so far not checked by this sniff.
While the `Squiz.WhiteSpace.ScopeKeywordSpacing` sniff will already handle this, that sniff may not be in use in all standards using this sniff. As things were, this sniff was just no longer feature complete for the task this sniff is supposed to handle: spacing of function declaration arguments.
This commit adds handling the spacing after modifiers used for constructor property promotion to this sniff.
The spacing requirements are aligned with the spacing expectations of the `Squiz.WhiteSpace.ScopeKeywordSpacing` sniff, so the sniffs should not conflict with each other.
Additionally, the new checks in this sniff have dedicated error codes, which means that - if there would be a conflict anywhere - the modifier spacing checks within this sniff can easily be turned off.
Includes tests.
0 commit comments