0

I'm using VS 2012 Extension Web Essentials 2012 and I have some questions about it:

  1. I'm trying to export its settings so they can be shared on other machines. But I can't find any hint on that.
  2. And if it is somehow possible, how can I extend the list of files ignored by jshint. E.g. jQuery.js is ignored but not jQuery.validate.js, so I have a lot of warning of 3rd party files.

EDIT

First question is solved, I had to right click on my solution node in VS, move to Web Essentials and then to choose Create solution settings. I got an XML file that can be checked in into source control and then be reused by other machines.

Second question remains open

iappwebdev
  • 5,880
  • 1
  • 30
  • 47

2 Answers2

0

Regarding question #2, jshint ignore list in web essentials is currently implemented (hardcoded) as a private static, see the source on GitHub (lines highlighted). Also, parsing .jshintignore files is not currently implemented.

Boris B.
  • 4,933
  • 1
  • 28
  • 59
0

If you want JSHint to skip some files you can list them in a file named .jshintignore. For example:

legacy.js
somelib/*.*
otherlib/*.js

EDIT [[Solution Updated..]]

You can Try this One. So there is an option to ignore files in jshint, but it's not set within .jshintrc but rather a separate file .jshintignore, which makes sense. However, while jshint will look for .jshintrc in your project's subdirectories, .jshintignore needs to be in the project root. So .jshintrc is in /js while .jshintignore needs to be placed in /.

So to solve the problem in my question /.jshintignore needs to contain:

js/html5.js
js/theme-customizer.js
And that's it!

Referred From This Question

Community
  • 1
  • 1
coolprarun
  • 1,153
  • 2
  • 15
  • 22
  • That is for Web Essentials 2013 only. And I'm wondering how to create a file named `.jshintignore` under Windows. – iappwebdev Aug 19 '13 at 13:11
  • I think so you can use any editor like notepad++ with required commands to perform or ignore and You put it in your root directory (where you're running jshint command). @Simon – coolprarun Aug 20 '13 at 04:57
  • I was able to create that file with Notepad++ (trying directly with file explorer results in error 'You must type a file name'). But unfortunately Web Essentials which runs jshint does not pick up that file. As Boris B. pointed out, parsing this file is not currently implemented. But thanks for trying to help. Apparently I will have to wait for an update for Web Essentials 2012. :-( – iappwebdev Aug 20 '13 at 07:19
  • Oh that's Fine.. If i got any other Solution will reply u soon.. @Simon – coolprarun Aug 20 '13 at 07:20