Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of automatically repairing eslint error by sublime

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how sublime automatically fixes eslint errors. I hope you will get something after reading this article. Let's discuss it together.

The method of automatically repairing eslint error by sublime

1. Install global installation eslint

Npm install eslint-g

Install the eslint plug-in globally

Npm install eslint-plugin-html-gnpm install babel-eslint-g

Generate eslint files in projects that need to use eslint

Eslint-init

2. Install the plug-in ESLint-Formatter on the sublime editor

Find Tools > Build System > New Build System in the menu bar, create a new eslint-fix.sublime-build file, and then the contents are as follows:

{"shell_cmd": "eslint-- fix $file"}

Or

{"cmd": "D:\\ dev\\ nvm\\ npm\\ eslint.cmd-- fix $file"}

3. Use the shortcut key ctrl+b to run the build file you just created

After reading this article, I believe you have a certain understanding of "sublime automatic repair eslint error reporting method". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for your reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report