This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252758 - More intelligent warning: Expected "!==" and instead saw "!=".
Summary: More intelligent warning: Expected "!==" and instead saw "!=".
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-02 16:50 UTC by NukemBy
Modified: 2015-06-02 19:02 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NukemBy 2015-06-02 16:50:43 UTC
Yes, usage of '===' / '!==' is more appropriate in 99.9% of cases in JavaScript, though in some really rare case I do need to use '==' and '!=', but that single occurrence spoils the 'green' state of my entire file. 

I do not want to disable this warning completely, but I'd like to have ability to disable it for a particular single expression, for example by using double parentheses:

- - - - - - - - - - - - 
if ((a == b)) {
  // do something
}

or

if ( ((a == b)) && ((c == d)) ) {
  // do something
}


- - - - - - - - - - - - 
As far as I know, JSLint absolutely does not tolerate '==' and '!='.