Eslint Setup

Eslint Tutorial

The purpose of Eslint is to detect javascript errors through the command line command.

Pre-condition : Ubuntu user, nodejs and npm installed, an javascript file to test

Check your node and npm installed or not by command : node -v and npm -v

It should show up the version of each respectively.

Install eslint through npm by :  npm install -g eslint

Set up a config file using the command : eslint --init You should answer your preference style, not use a standard.

After that, you can run Eslint on any Javascript file ( open terminal in the same folder as your js file) hit command eslint name-of-your-jsfile





If you want to configure the rules of eslint then locate your .eslintrc file in your directory ( should be given after you run eslint --init
If you liked this article

Let's subscribe the updates of Scuti!
Share on Google Plus

About Anonymous

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 Comments:

Post a Comment