Inspectopedia Help

Potentially invalid constructor usage

Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after new, using a constructor's prototype or calling a constructor without new. A constructor function is assumed to have an upper case name (optional) or have an explicit JSDoc @constructor tag.

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

JSPotentiallyInvalidConstructorUsage
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | JavaScript and TypeScript | Probable bugs

Inspection options

Here you can find the description of settings available for the Potentially invalid constructor usage inspection, and the reference of their default values.

Assume only functions in uppercase are constructors

Default: Selected

Last modified: 11 September 2024