Cannot use class members visibility modifiers

IDE keeps showing me these errors in one project:

Though my javascript language version is the React JSX

And in the second project with the same settings I can use private or protected modifiers without any problems.

Could you help with this? What is the source of the problem? Is this a bug?


Is your project attached to other projects/have nested '.idea' folders in its structure? Must be

Please select your .js file in Project tool window, hit Ctrl+Q (or whatever shortcut is assigned to View | Quick Documentation main menu action) and attach a screenshot of the popup that opens


This is a configuration of project where use of modifiers is seen as error:


This is configuration in the project where I can use private modifiers without any problems:


Hmm... There are no visibility modifiers in Javascript (except for basic support for private fields denoted with # in ESNext proposals, see See

In your other project, you are using TypeScript, not JavaScript, that's why it works for you there