error with {

Hello,

im a newbie an have a question how can i remove the errors in phpsorm on editing a js file.

myfuncion { ...

says: Expecting newline or semicolon

myfuncion
{ ...

is OK. But i will use functions in this way: "myfuncion { ..."

Bfo

0
4 comments

Please could you share the exact code snippets? myfuncion {} doesn't look like a valid javascript function definition

Please refer to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions for more info on defining functions

0

Hi,

at this moment, i have found the answer.We use a special framework, what merges parts of js files togehther. Therfore in the js file (parts) are some thing missing and will be available until the project is saved and start "running".

In the final js file, phpstorm does not show the bracket error (everything is OK), like expected.

Ok, then for my spcial enviroment- can i disable this error management (for the bracket) ?

 

Bfo

0

You can't. The error comes from the parser and thus can't be suppressed, the only way to get rid of it is disabling syntax highlighting via the inspections widget in the upper right corner. See https://www.jetbrains.com/help/phpstorm/2021.1/disabling-and-enabling-inspections.html#change-highlighting-level-for-file

0

Please sign in to leave a comment.