当前位置:网站首页>Vscode automatic eslint formatting when saving code
Vscode automatic eslint formatting when saving code
2022-06-11 17:08:00 【Boale_ H】
background
We expect to use vscode When coding , It can be based on eslint The rules , Automatically format our code . Then you can set vscode Automatic formatting of , To fulfill this need .
Realization way
install vscode plug-in unit Eslint

modify vscode Set up
file - Preferences - Set up, Or throughctrl + shift + p => Preferences : Open workspace settings, open vscode Set the interface
open settings.json, Add the following configuration

{ "search.followSymlinks": false, "editor.tabSize": 2, // To configure eslint "eslint.validate": [ "javascript", // use eslint Rule detection for js file "javascriptreact", "vue", "html", ], // Enable auto repair on save eslint, Only supported by default .js file "editor.codeActionsOnSave": { "source.fixAll.eslint": true } }
Then when you write code , Save code ,vscode Automatically based on eslint Rules format code
Article reference :https://blog.csdn.net/halo1416/article/details/120945975
边栏推荐
- jsp页面初始加载方式
- Haas, which integrates relevant technologies of Alibaba cloud, Dharma Institute and pingtouge, has officially announced the book
- Error: error summary of pointer as function parameter
- ShellBrowser .NET Crack
- LeetCode——42. 接雨水(双指针)
- Leetcode 1974. Minimum time to type words using a special typewriter (yes, once)
- Le compte de titres de l'école de commerce kainiu est - il sécurisé? Frais d'ouverture de compte
- GUI guess number game, directly open play
- Weekly recommended short video: rookie CEO talks about the new logistics track in the future
- Time series prediction | MATLAB realizes future multi-step prediction of RBF RBF neural network time series
猜你喜欢

Global and Chinese molten carbonate fuel cell industry outlook and market panoramic Research Report 2022-2028

GemBox. Bundle 43.0 Crack

【clickhouse专栏】新建库、用户及角色

Research Report on operation mode and investment opportunities of China's aluminum industry 2022-2028

2022 simulated examination question bank and simulated examination for crane driver (limited to bridge crane)

Report on the operation situation and future prospects of China's gear oil industry (2022-2028)

^31 prototype interview questions

Using MATLAB and dcraw to process digital camera raw files

Docker安装mysql5.7(开启binlog功能、修改字符)

Text driven for creating and editing images (with source code)
随机推荐
Talk about the interview questions of the collection
Redis --- 学习 NoSQL 五大类型
JPA循环保存多个实体失败
Difference between select into from and insert into select
《DAMA数据管理知识体系指南》:章节分值占比
Analyze which should be tested in PMP and ACP with actual cases? Which is more useful?
消息队列-推/拉模式学习 & ActiveMQ及JMS学习
Redis - learn five types of NoSQL
(validation file) validatejarfile report errors
Using MATLAB and dcraw to process digital camera raw files
CS0006 C# 未能找到元数据文件“C:\Users\...问题
Solr (II) Solr adds core and dependent package path
LeetCode-384. Scramble array
LeetCode-384. 打乱数组
Typescript learning notes (II)
LeetCode-859. 亲密字符串
Development planning of China's stainless steel market and suggestions on the development direction of the 14th five year plan 2022-2028
Haas, which integrates relevant technologies of Alibaba cloud, Dharma Institute and pingtouge, has officially announced the book
Katalon Studio Enterprise
Oracle生成不重复字符串 sys_guid()与Mysql生成唯一值