下面由sublime教程栏目给大家介绍sublime自动修复eslint报错的方法,希望对需要的朋友有所帮助!
1.安装全局安装eslint
npm install eslint -g
全局安装eslint插件
npm install eslint-plugin-html -g npm install babel-eslint -g
在需要用到eslint的项目生成eslint文件
eslint --init
2、在sublime编辑器上安装插件ESLint-Formatter
菜单栏找到 Tools > Build System > New Build System,新建一个 eslint-fix.sublime-build 文件,然后里面内容如下:
{ "shell_cmd": "eslint --fix $file" }
或者
{ "cmd": "D:\\dev\\nvm\\npm\\eslint.cmd --fix $file" }
3、用快捷键 ctrl+b 运行刚刚创建的 build 文件
推荐教程:《sublime text》
The above is the detailed content of How does sublime automatically fix eslint errors?. For more information, please follow other related articles on the PHP Chinese website!

SublimeText is suitable for beginners and experts. 1. Shortcut keys and command panels improve efficiency. 2. Package manager extension function. 3. Customize the details of the configuration file. 4. Multiple selection and editing functions are used to refactor code. 5. Search and replace function positioning and modify code. 6. Project management and version control integration facilitate project management.

The performance benefits of SublimeText are fast startup, multi-threading, and a rich plug-in ecosystem, but at the expense of high license fees, complex plug-in configurations, and potentially increased memory footprint.

SublimeText is suitable for users who pursue simplicity and highly customized, while VSCode is more suitable for users who need one-stop service and better user experience. The SublimeText interface is simple and complex, suitable for advanced users; the VSCode interface is modern and easy to use, suitable for beginners and team collaboration.

SublimeText is suitable for users who pursue speed and simplicity, while VSCode is suitable for users who need rich features and powerful integration capabilities. 1) SublimeText is known for its lightweight and highly customizable, fast and powerful multi-line editing. 2) VSCode is known for its scalability and integration, with built-in Git support and debugging tools, suitable for cross-language development.

SublimeTextexcelsinspeedandsimplicity,idealforquickeditsandadistraction-freeenvironment,whileVSCodeoffersextensivefeaturesandcustomizationforlargerprojects.SublimeTextislightweightandfast,perfectforfocusedcodingwithasimplecommandpaletteforactionslike

SublimeText is suitable for programming because it is powerful and flexible. 1) Multiple selection and editing functions allow multiple locations to be modified at the same time to improve reconstruction efficiency. 2) The command panel and shortcut keys provide quick access and custom operations to improve development efficiency. 3) Support regular expressions, macros and plug-ins, suitable for advanced usage and performance optimization.

SublimeText is available for purchase for one time, priced at $70, and is permanently used with a PC; VSCode is free to use, and there is no license fee, but extensions and themes may be charged. When choosing, use requirements and budgets should be considered.

To run Sublime Text, you need to download, install the application, purchase a license (optional), and then launch the application. Create or open a file to start encoding.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Chinese version
Chinese version, very easy to use

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.