| Summary: | [eslint] Improve the eqeqeq rule for comparing null-ness | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 5.0 | ||
| Target Milestone: | 5.0 RC1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Consider the following snippet: var x = null; if(x != null) { //do something } The '!=' will be flagged stating you should use '!===', but in the case of null/undefined-ness, we should allow the use of '!=': https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Sameness