Inspectopedia 2025.3 Help

Method can be made 'static'

Reports a class method that can be safely made static. A method can be static if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass.

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.

JSMethodCanBeStatic
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 | General

Use the first checkbox below to inspect only private methods.

Inspection ID: JSMethodCanBeStatic

Inspection options

Here you can find the description of settings available for the Method can be made 'static' inspection, and the reference of their default values.

Only check 'private' methods

Option ID:

myOnlyPrivate

Default value:

Not selected

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection JSMethodCanBeStatic

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Last modified: 03 December 2025