Php storm project does not recognize parseInt in javascript files.

.JS files are recorgnized as Javascript

However basic ECMA functions like parseInt(...) and eval (...) are unrecognized.

PHP 2017.3 states the function is unresolved or undefined. 

Please help.

Thanks in advance, 

 

Sjoerd 

 

8 comments

Hello,

What JS language version is set in Settings/Preferences | Languages & Frameworks | JavaScript?

0

It is currently set to ECMA Script 5.1

0

Works fine for me - both functions are correctly resolved

Did you try invalidating caches? can you check if the issue is reproducible in a new project? Create a new empty project, add a .js file, or copy your current js file to it - does the issue persist?

0

No luck. 

New project... same issue:

0

I'll try to save my settings, reset them and see if with reset setting this persist or is resolved.

 

0

Just removed all (global) and openend a new project, 

Problem solved...

See below

 

 

0

Issue is related to registered types:

Javascript Ecma Script is stored in .ts file.

I have also TYPOSCRIPT files related to extension *.ts.

Upon reïndexing the TYPOSCRIPT is recognized, but the Javascript ECMA script is no longer.

 

0

Possible solution:

1. Rename all typoscript files to an extension like i.e. '.typoscript'

2. Rename TYPESCRIPT extension to *.d.ts

 

The latter gives problems with actual typescript files (if you have them)

 

0

Please sign in to leave a comment.