-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Open
Labels
Description
With eslint-config-airbnb-base@8.0.0
the code
class Example {}
module.exports = Example();
would result in the error:
example.js:2:18: A function with a name starting with an uppercase letter should only be used as a constructor. [Error/new-cap]
As a result of #1090, which set capIsNew: false
for new-cap
, this is no longer the case.
#1089 (comment) which motivated the change only mentions adding "capIsNewExceptions": ["Immutable.Map", "Immutable.Set", "Immutable.List"]
. Would it make sense to revert capIsNew: false
(and perhaps adopt "capIsNewExceptionPattern": "^Immutable.\\w"
as suggested in #1106) or was there another rationale for setting capIsNew: false
?
Thanks,
Kevin