Why does WebStorm annotate the 'views' property so strictly?
The following code will report an error "Cannot resolve symbol: true":
var obj = { views: { a: true, b: false } };
This only happens if I use the property 'views'. Replacing it with another word removes the error annotation.
I can also disable the error by adding this line above:
//noinspection JSAnnotator
Or to disable it for the whole project, I can hit Alt-Enter on the word, select Suppress for statement > Edit inspection profile settings, and then disable inspections for "Javascript general errors".
Although actually I would like to keep that feature enabled, to check for other errors, just not errors on properties called 'views'.
But anyway the thing that I am really curious about, is why! As far as I know 'views' is not a reserved Javascript keyword. Is it perhaps a critical keyword in some popular library which I have never used?
TIA.
Please sign in to leave a comment.
it's a bug, please follow https://youtrack.jetbrains.com/issue/WEB-21792 for updates