Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9005609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:11:31+00:00 2026-06-16T01:11:31+00:00

I have been validating my JavaScript using JSLint for about 2 years now and

  • 0

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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:11:32+00:00Added an answer on June 16, 2026 at 1:11 am

    Well it looks like Douglas Crockford just made a whole lot more people switch to JSHint. Have a look at this commit.

    The “Mixed spaces and tabs” error has been removed, and a new “Use spaces, not tabs” error has been added in its place. Aside from that, there’s one tiny change in that diff that shows the cause of this. The following line (comment added):

    at = source_row.search(/ \t/);
    //                      ^ Space
    

    has been replaced with this:

    at = source_row.search(/\t/);
    //                      ^ No space!
    

    Following that search there’s an if statement. If the condition evaluates to true, the “Use spaces, not tabs” warning is issued. Here’s that statement:

    if (at >= 0) {
        warn_at('use_spaces', line, at + 1);
    }
    

    I hope that this is just a little oversight by Crockford. As you can see, JSLint is now going to raise this warning if you use a tab character anywhere. Unfortuately, his commit messages are completely useless, and the documentation doesn’t appear to have been updated, so I can’t do anything other than speculate as to the reasons behind this change.

    I suggest you abandon JSLint and switch to JSHint right now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It has been long time since we have been validating our forms using JavaScript.
I have been writing a code for validating forms using javascript/jquery. Following is a
I have been struggling for a while to get javascript to validate a WordPress
I have a problem where I'm validating that the current time has been inserted
I have only recently started using CakePHP and have been unable to get validation
Have been trying to encrypt an xml file to a string so that I
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
Have been reading about async and tasks and been attempting to convert the CopyFileEx
So I have been exploring different methods to clean up and test my JavaScript.
I have the following regex: ^[a-zA-Z](.*)[a-zA-Z]$ on both the Javascript and PHP side that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.