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 7644047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:35:35+00:00 2026-05-31T09:35:35+00:00

I am using the visual studio JSLint plugin to keep my javascript in order,

  • 0

I am using the visual studio JSLint plugin to keep my javascript in order, which seems to work really well apart from this one problem.

If I type in

x = (function () {
}())

And then put the semicolon on the end, Visual studio corrects it to:

x = (function () {
} ());

And then JSLint complains JS Lint: Unexpected space between '}' and '('.

Obviously this is fixable by removing the space, but visual studio is very persistent in putting the space back. Putting a semicolon anywhere inside the function, which is most of the file, will cause VS to put the space back. This is starting to get annoying.

I’ve tried mucking about with the visual studio Javascript editor settings (‘insert space after…’), but can’t seem to stop it doing this.

Another way this could be expressed is

x = (function () {
})();

Which VS leaves alone, but JSLint says JS Lint: Move the invocation into the parens that contain the function. So no dice there.

Any suggestions? I know I can turn bits of JSLint off, even just around this last line of the file, but that’s going to look messy, I’d like to do a bit better.

  • 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-05-31T09:35:36+00:00Added an answer on May 31, 2026 at 9:35 am

    I don’t have a better response than turning off whitespace formatting rule checking, but this is very unfortunate. As far as I can tell, this one situation described here is the only case were visual studio automatic formatting and jslint collide in a way you can’t reasonable config your way out of.

    Losing the entire whitespace checking for this source file, or losing the auto reformatting of the rest of your JavaScript, are both somewhat sledgehammer approaches to this problem. I’d love to see another creative option if anyone has one.

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

Sidebar

Related Questions

(Using Visual Studio 2005 / .NET 2.0) I have a DataSet which is being
(Using Visual Studio 2008, and Silverlight 3) -I've really looked around for this one,
Using Visual Studio's Managed Package Framework, how can I inherit from C# so I
Using Visual Studio 2010 C++. I have a project which uses MFC and I
Using Visual Studio 2008, I keep seeing this error in the output window: _CrtDbgReport:
I am using visual studio 2010. It seems that out of nowhere, I can't
Using Visual Studio 2008 Team Edition, is it possible to assign a shortcut key
Using Visual Studio 2008 / C# / VS Unit Testing. I have a very
Using Visual Studio .NET 2008 or 2005, is there a way to automatically generate
Using Visual Studio 2008, I created a C++ Win32 project. To release the program,

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.