I have been validating my JavaScript using JSLint for about 2 years now and once in a while there are rules that change. In general when JSLint introduces a new rule, there is a checkbox to ignore this rule when parsing, or if you choose to not ignore it then to make your code compliant to it.
As I was running my JSLint validation today, however, I run into these two new errors:
Use spaces, not tabs.
This is not the "mixing of tabs and spaces" error. I am using only tabs. This is a recently modified version of "mixing of tabs and spaces" which now disallows tabs in general.
And:
Unsafe character.
*/
Unsafe character.
_const: {
There are no new options to ignore. I cannot understand what is unsafe about closing a block comment, why it considers _const: { as unsafe when I have nomen: true
, (dangling _ in identifiers) or why should I be suddenly switching from spaces to tabs, when I still have the configuration about indentation of 4 spaces being a tab.
Does anyone have an idea why those were introduced to at least how to make JSLint ignore these new rules?
Update:
The Messy White Space
option works around the issue but it would cause other unexpected behavior:
if (condition) {
// ^-- there is a space but it won't indicate an error