This rule would fail when the constituent part of closed-form compound words are capitalised.
function unSubscribe() {}
let passWord;
let isInViewPort;
function unsubscribe() {}
let password;
let isInViewport;
Compound words are formed by joining together two or more other words. Closed-form compound words do that without a hyphen/space. They are words in their own right, and should be treated as such when applying programming casing conventions.
Time and again I see these words incorrectly treated as separate words for the purpose of camelCase. This causes the following problems:
Standalone: callBack, dataBase, fileName, lookUp, offLine, onLine, overRide, passWord, payLoad, placeHolder, preView, setUp, unSubscribe, userName, viewPort, weekEnd
Combined: isInViewPort, showPreView, isOnLine
Some of these are arguably OK, others are definitely not.
The ESLint rule id-blacklist can be configured to disallow a list of identifiers. It has some limitations (by design) which make it less than ideal for this problem:
isInViewPort
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too