ReSharper Help


ReSharper | Options | Code Editing | JavaScript | Inspections

On this options page, you can adjust the way code inspection works in JavaScript.

JavaScript language level Allows choosing the ECMAScropt version that is used to analyse JavaScript code.
Analyse properties' context when inspecting code This check box, which is disabled by default, enables deeper analysis of properties. When disabled, only unknown properties are detected as errors. When enabled, reassigned properties are detected as well. E.g.:
var a = { prop1 : "property" }; var b = { prop2 : "property" }; a.prop2 // The error here is only detected if the option is enabled
Ignore assignment in condition warning if there are redundant parenthesis around This preference allows you to ignore the 'Assignment to a variable inside a conditional statement' code inspection if this assignment is surrounded with parentheses.
That is, ReSharper will not detect a warning in the following JavaScript code:
var a = 10; if ((a = 5)) { doSomething(); }
Moreover, if the assignment is not surrounded with the parentheses, ReSharper will suggest to add them:
Ignoring assignment in condition

See Also

Last modified: 21 September 2015