Quantcast
Channel: JSLint.NET
Viewing all 537 articles
Browse latest View live

Edited Unassigned: JSLint runs on build even when option is turned off [45]

$
0
0
I do not want JSLint.NET to run when the project is built. I have that option turned off, but in the output window, I still see it running and reporting all the errors.

Edited Unassigned: JSLint runs on build even when option is turned off [45]

$
0
0
I do not want JSLint.NET to run when the project is built. I have that option turned off, but in the output window, I still see it running and reporting all the errors.

Edit: this was an user error. I had both JSLint.NET VS and JSLint.NET MSBuild installed. Uninstalling JSLint.NET MSBuild fixed the issue for me.

Closed Unassigned: JSLint runs on build even when option is turned off [45]

$
0
0
I do not want JSLint.NET to run when the project is built. I have that option turned off, but in the output window, I still see it running and reporting all the errors.

Edit: this was an user error. I had both JSLint.NET VS and JSLint.NET MSBuild installed. Uninstalling JSLint.NET MSBuild fixed the issue for me.
Comments: Right, no problem. Yes, JSLint.NET for MSBuild (aka the NuGet package) can __only__ run on build. I will close this issue.

Edited Unassigned: JSLint runs on build even when option is turned off [45]

$
0
0
I do not want JSLint.NET to run when the project is built. I have that option turned off, but in the output window, I still see it running and reporting all the errors.

Edit: this was an user error. I had both JSLint.NET VS and JSLint.NET MSBuild installed. Uninstalling JSLint.NET MSBuild fixed the issue for me.

New Post: Does JSLintNet.MSBuild process all files on every build or does it ignore files that haven't changed?

$
0
0
We would like to use the JSLintNet.MSBuild package for compile-time jslinting. We have a lot of javascript files in some of our apps, so one concern is performance. Is the build-time jslint able to skip processing files that haven't changed since the last build?

New Post: Does JSLintNet.MSBuild process all files on every build or does it ignore files that haven't changed?

$
0
0
Great question.

The short answer is that it currently scans all JavaScript files that do not match the ignore list each time.

That said, I'm proud to say it is extremely fast. One of the reasons JSLint.NET ships with V8 instead of something smaller or more convenient is that it outperforms them so handily. JSLint.NET also efficiently reuses one V8 context for an entire run, so it only needs to spin up and wind down once.

So my suggestion would be to try it and see.

I've personally used JSLint.NET over projects with nearly 1500 JavaScript files, and the performance was more than acceptable; around one second.

New Post: Does JSLintNet.MSBuild process all files on every build or does it ignore files that haven't changed?

$
0
0
If you do try it, please let us know how it goes.

If JSLint.NET needs some optimization (such as caching results) for larger sets of JavaScript files, we'd be happy to raise an issue for it.

New Post: does jslint net support esnext - how can i over come let

$
0
0
does jslint net support esnext - how can i over come let

New Post: does jslint net support esnext - how can i over come let

New Post: JSLint Common Settings for General use and very strict

$
0
0
Hi


I am currently building against SharePoint 2013's App model and I want to avoid costly typos in my CSOM / JSOM code


I know this a bit subjective, but is there recommended settings for

1) General or pragmatic settings - general good practice and avoiding mistakes in the code so fewer warnings - all newbies should set this etc. For example, I don't want to be told about lines being too long!

2) Uber strict - lots of warnings

Regards

Daniel



Cheers

New Post: JSLint Common Settings for General use and very strict

$
0
0
Great questions.
  1. I'm going to have to fall back on "it all depends" I'm afraid. JSLint (and therefore JSLint.NET) has all options undefined by default - including the line length limiter - so I would start there. But the realities of your environment may require some tweaking and tolerating some things.
    For example, if you work a lot with third party libraries, it's likely you have no control over callback / event handler signatures. In that case, turning on "unparam" toleration is likely to be necessary.
    Again, the maximum line length option is undefined by default.
  2. JSLint is somewhat "uber strict" regardless. But there are some toleration options that I would never recommend turning on, such as "sloppy" which allows a missing 'use strict' pragma. Using strict mode makes JavaScript more robust for free.
The workflow I recommend is to start with the JSLint.NET for MSBuild NuGet package. Inside your project, include two JSLintNet.json files, one for defaults and one for Release mode. The default is set to output JSLint violations as warnings, and the Release version (JSLintNet.Release.json) output errors.

What this means is that JSLint violations will be visible during debug and development, but should not slow you down while you're actively iterating and refactoring. Once it's time to commit though, all warnings must be cleaned up, and building in Release mode (the assumption is that all CI servers do this) will ensure nothing slips through the cracks.

New Post: JSLint Common Settings for General use and very strict

$
0
0
Thanks for a thoughtful answer. I will appraise the dev team with your response when I am in the office. Also would you mind if I tweeted a link to this discussion, as I think others will find it useful.

Daniel

New Post: JSLint Common Settings for General use and very strict

$
0
0
Not at all - link away.

I really want to find the time to do a video with some of these workflow tips. It's hard to explain the nuances in writing.

New Post: JSLint Common Settings for General use and very strict

$
0
0
Thanks, for lettering me know.

Perhaps there is another short term approach. Why don't you have a "Getting Started" post that has a screen dumps of the settings for the following
  • General best practice JS Development ( dev and release)
  • Working with Knockout or Angular or Node.
In the discussion dev's could comment that they use so and so settings because......


I find pictures are one way to avoid my terrible spelling in posts or emails ;-)

Commented Issue: Bug: Microsoft C++ runtime libraries cannot be found [39]

$
0
0
In certain environments, such as a Visual Studio Online hosted build controller, the MSBuild task can fail with the following error:

"C:\a\src\XXX\ProjectX\ProjectX.csproj" (default target) (8) ->
(JSLintNet target) ->
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: The "JSLintTask" task failed unexpectedly. [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: Noesis.Javascript.JavascriptException [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Noesis.Javascript.CompileScript(Local<v8::Script>* , Char* source_code, Char* resource_name) [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Noesis.Javascript.JavascriptContext.Run(String iSourceCode) [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at JSLintNet.JSLintFactory.CreateContext() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at JSLintNet.JSLintTask.Execute() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [C:\a\src\XXX\ProjectX\ProjectX.csproj]

Experiment with different locations for the x86 and amd64 versions of the msvcp100.dll and msvcr100.dll libraries so they can be found by JSLint.NET.
Comments: When is the fix for this likely to be checked in?

Edited Issue: Error on Visual Studio Online hosted build controller [39]

$
0
0
In certain environments, such as a Visual Studio Online hosted build controller, the MSBuild task can fail with the following error:

"C:\a\src\XXX\ProjectX\ProjectX.csproj" (default target) (8) ->
(JSLintNet target) ->
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: The "JSLintTask" task failed unexpectedly. [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: Noesis.Javascript.JavascriptException [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Noesis.Javascript.CompileScript(Local<v8::Script>* , Char* source_code, Char* resource_name) [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Noesis.Javascript.JavascriptContext.Run(String iSourceCode) [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at JSLintNet.JSLintFactory.CreateContext() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at JSLintNet.JSLintTask.Execute() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [C:\a\src\XXX\ProjectX\ProjectX.csproj]

Experiment with different locations for the x86 and amd64 versions of the msvcp100.dll and msvcr100.dll libraries so they can be found by JSLint.NET.

Commented Issue: Error on Visual Studio Online hosted build controller [39]

$
0
0
In certain environments, such as a Visual Studio Online hosted build controller, the MSBuild task can fail with the following error:

"C:\a\src\XXX\ProjectX\ProjectX.csproj" (default target) (8) ->
(JSLintNet target) ->
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: The "JSLintTask" task failed unexpectedly. [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: Noesis.Javascript.JavascriptException [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Noesis.Javascript.CompileScript(Local<v8::Script>* , Char* source_code, Char* resource_name) [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Noesis.Javascript.JavascriptContext.Run(String iSourceCode) [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at JSLintNet.JSLintFactory.CreateContext() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at JSLintNet.JSLintTask.Execute() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\a\src\XXX\ProjectX\ProjectX.csproj]
C:\a\src\XXX\packages\JSLintNet.MSBuild.1.6.2\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [C:\a\src\XXX\ProjectX\ProjectX.csproj]

Experiment with different locations for the x86 and amd64 versions of the msvcp100.dll and msvcr100.dll libraries so they can be found by JSLint.NET.
Comments: The VC++ runtime was a misdirect unfortunately, and not the problem. The build failures appear to be quite random, and can be reproduced both on 32bit and 64bit. I'm worried it's a bug in the [JavaScript.NET](https://github.com/JavascriptNet/Javascript.Net) library or some inconsistency in the Visual Studio Online build servers that we have no control over. Currently there is no ETA.

New Post: Separating syntax errors from JSLint suggestions

$
0
0
Hi,

Right now, I'm not a JavaScript expert, but I installed JSLint to become one. I like the suggestions it gives me, but I would like to separate them from typical syntax errors. I want to achieve the best code quality, but I would love to have a properly parsed JavaScript file.

Is that possible?

Best wishes,
Mariusz

New Post: Separating syntax errors from JSLint suggestions

$
0
0
By default in JSLint.NET for Visual Studio, JSLint warnings show as blue squiggles whereas syntax errors discovered by Visual Studio will show as red squiggles. So that's one differentiation in the code editor.

To change how they appear in the error list, you can create a JSLintNet.json file in the root of your project and change the output to Warning or Message rather than Error.
{
  "output": "Warning"
}

New Post: Intermittent Noesis.Javascript.JavascriptException in Windows Server 2012 x64

$
0
0
I am getting really strange errors when using MSBuild on my build servers. (Truncated for clarity)
src\packages\JSLintNet.MSBuild.1.6.5\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: The "JSLintTask" task failed unexpectedly. src\packages\JSLintNet.MSBuild.1.6.5\build\JSLintNet.MSBuild.targets(20,5): error MSB4018: Noesis.Javascript.JavascriptException 
error MSB4018:    at Noesis.Javascript.CompileScript(Local<v8::Script>* , Char* source_code, Char* resource_name) 
error MSB4018:    at Noesis.Javascript.JavascriptContext.Run(String iSourceCode)
error MSB4018:    at JSLintNet.JSLintFactory.CreateContext() 
error MSB4018:    at JSLintNet.JSLintTask.Execute()
error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
The command used to run the build was
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /t:JSLintNet MyProject.csproj
The error happens seemingly randomly. I ran the same command in quick succession, and I have failures 50% of the time.

As a side note, running JSLintNet.Console.exe works 100% of the time.
packages\JSLintNet.MSBuild.1.6.5\tools\JSLintNet.Console.exe MyProject
It also works 100% of the time on developer machines I have tested (Windows 7 64-bit, same MSBuild version)

More details about my build environment:
  • Windows Server 2012 64-bit
  • MSBuild: 4.0.30319
  • .NET Framework: 4.5
Anybody has any ideas on what could be the cause? If V8 is the issue, is there a beta version using Chakra that I could try? The beta NuGet package seems to be delisted.
Viewing all 537 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>