Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Latest commit

 

History

History
35 lines (27 loc) · 758 Bytes

logevent-literal-max-len.md

File metadata and controls

35 lines (27 loc) · 758 Bytes

logevent-literal-max-len

This rule ensures logged event does not exceed 50 characters.

Rule Details

Examples of incorrect code for this rule:

/*eslint saxo/logevent-literal-max-len: "error"*/
featureTracker.logEvent(
    AREA,
    'This string contains more characters than it should, which is 50 at the moment'
);
/*eslint saxo/logevent-literal-max-len: "error"*/
logEvent(
    AREA,
    'This string contains more characters than it should, which is 50 at the moment'
);

Examples of correct code for this rule:

/*eslint saxo/logevent-literal-max-len: "error"*/
featureTracker.logEvent(AREA, 'Event occurred');
/*eslint saxo/logevent-literal-max-len: "error"*/
logEvent(AREA, 'Event occurred', options);