Archive

Posts Tagged ‘vscode’

[Step by Step] Using JSLint extension in VSCode

In this article, lets see how to Install and use JSLint extension in VSCode.

What is JSLint:

  • JSLint is a JavaScript program that looks for problems in JavaScript programs. It is a code quality tool.
  • JSLint takes a JavaScript source and scans it. If it finds a problem, it returns a message describing the problem.

Install JSLint extension in VSCode:

  • From the VSCode ‘Extensions’, search for ‘JSLint’ and Install.
  • Next, we need to install ‘jslint’ Globally by running ‘npm install -g jslint’ command from Terminal.
  • All the required files gets installed and Terminal looks as below.

Run JSLint on a JavaScript File:

  • Open the JavaScript file, which you want to validate in VSCode.
  • Open the Terminal and run ‘jslint {file_name}’ command. In my case, its ‘jslint HelloWorld.js’.
  • Script violations will be listed in Terminal as below.

🙂

Categories: JScript Tags: ,