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
Joshua Hegedus edited this page Mar 24, 2025
·
2 revisions
Avoid using numbers at the end of variable or function names.
Rule Details
Examples of incorrect code for this rule:
constfoo1=1;constbar2=2;functionbaz3(){return3;}
Examples of correct code for this rule:
constfoo=1;constbar=2;functionbaz(){return3;}
Options
You can pass an allow option to specify a list of variable or function names that are allowed to have numbers at the end.
By default, the rule allows s3 and v4 as they are common in the JavaScript world. (e.g. s3 for AWS S3, v4 for UUID v4)
You can pass an extensions option to specify a list of file extensions that will be checked. By default, the rule checks .js, .jsx, .ts, and .tsx files.