Configuration of Vscode Js plugin Jshint

Source: Internet
Author: User

Vscode This editor is very comfortable to use, but just start the child shoes may have some fear of the installation of its plug-in, although Vscode provides plug-in search and installation, but some of the plug-ins need some software or packages and other things to support, is not in the vscode inside download good after can use, download good plug-in but did not implement support words Vscode frequent error can be forced to die of obsessive-compulsive disorder.

Today, when I want to write the JS code on the Vscode, I was prompted:

"Failed to load Jshint library. Please install Jshint in your workspace folder using ' npm install Jshint ' or globally using ' NPM install-g jshint ' and th En press Retry"

Search the Internet for some of the Jshint simple configuration and introduction, but the problem is missing a thing, need to use NPM command installation, so in the command line howling on the NPM install Jshint, the result is disappointing, the terminal tip: "NPM is not internal or external instructions." It's a search. NPM is a NODEJS package management tool that uses the need to download Nodejs. Node's download and installation method is quite simple, not to mention here.

After you have installed node, you can open the command line under the working space you have set up to use NPM install Jshint to download the missing package.

After that, you need to make a simple configuration of the Jshint in the workspace: Create a. jshintrc file, copy the code below, and then use it.

{"    globals": {        "$": false,        "window": false,        "document": false    },    "Strict": true,    "Curly ": True,    " Eqeqeq ": true,"    Noarg ": True,    " Noempty ": True,    " Quotmark ":" single ","    undef ": true,    "unused": true}

Jshint configuration items can be referenced in http://jshint.com/docs/options/
Strict mode can refer to Https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode

Configuration of Vscode Js plugin Jshint

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.