Home  >  Article  >  Development Tools  >  sublime text3 eslint installation tutorial

sublime text3 eslint installation tutorial

藏色散人
藏色散人forward
2019-09-03 14:27:073652browse

The following column sublime usage tutorial will share with you the sublime text3 eslint installation tutorial. It is very simple. I hope it will be helpful to friends in need!

sublime text3 eslint installation tutorial

sublime text3 eslint installation tutorial

Start the installation

All the above are installed , then install global eslint

sudo npm install eslint -g

If you are installing or using eslint for the first time, you can initialize an eslint file in the project

eslint --init

If there is no package in the project root directory. json file, it will prompt you to use npm init to initialize a package.json file.

Configure sublime text3

The sublime text2 editor does not support the following plug-ins~

SublimeLinter is a code check The framework plug-in is very powerful and supports checks in various languages. However, it does not have the function of code checking itself and requires specific language checking support such as ESLint.

SublimeLinter-eslint We install and use the corresponding SublimeLinter-contrib-eslint plug-in to help us use eslint

Babel babelThis still needs to be installed , used whether it is compiling files or packaging.

Configuration completed

If you installed it without errors, it will probably look like this! The sublime editor will have a highlighted reminder that your code does not conform to the eslint code style.

sublime text3 eslint installation tutorial

The above is the detailed content of sublime text3 eslint installation tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete
Previous article:Sublime adds vue templateNext article:Sublime adds vue template