Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
692 views
in Technique[技术] by (71.8m points)

asp.net mvc - How can I change jslint(VS 2010 extension) to ignore files?

I have js lint installed in Vs 2010 as a extension through the extension manager.

It finds lots of errors but they are all from external plugins or from the jquery library. I am not going to go and fix stuff in an external plugin or jquery file. So how can I get it to not check these files?

I am also wondering how can I get it to ignore checking href links. I am using asp.net mvc so my links are like this

<a href="/account/reg">reg </a>

So it can't find this path as it is the path to the controller action method not a file. So how can I get it to not look at these?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can exclude files (external plugins, jquery, etc.) from the JSLint validation process.

enter image description here

From here.

For the href issue, if you don't have any JS in your views, you could exclude those as well using the method above.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...