Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDocumentation misleading regarding bitwise option? #3242
Comments
|
That's strange. On my system, the option behaves in the way it is documented:
Before we can help, we'll need some more information. Could you share the other info documented in the project's contribution guidelines?
|
|
I get the same result with your example, but the results are swapped if I change out version of jshint: 2.9.5:
Input source code:
Configuration values: default (no custom config other than what is specified in the example) Description of expected behavior: No error re: Unexpected use of '^' Description of actual behavior:
Further details: Comparing the results when jshint is specified versus jslint:
Is this the expected behavior? |
|
Yup, that's expected. The |
|
Got it. Thanks for clearing that up! |
|
No problem! |
On http://jshint.com/docs/options/
bitwiseis listed as an enforcing option and says "When set to true, these options will make JSHint produce more warnings about your code" (emphasis mine) and "This option prohibits the use of bitwise operators such as ^ (XOR), | (OR) and others."However, setting:
/* jshint bitwise: true */suppresses errors about bitwise operators. Based on the description, I expected the opposite, that:
/* jshint bitwise: false*/would suppress errors about bitwise operators.