当前位置:网站首页>Vscode automatically formats code according to eslint specification
Vscode automatically formats code according to eslint specification
2022-07-01 07:14:00 【Kexiaonan】
Create a new project named... In the project root .vscode Folder , Create a new... In this folder settings.json The configuration file , The specific configuration is as follows :
{
"eslint.validate": [
"javascript",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
}
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": true
},
"eslint.format.enable": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true
}
}
When the configuration is complete , You can format the code by saving the code directly in the editor , Or a button shift + alt + F Format code shortcuts .
If vscode The local configuration does not need to be uploaded to the code base , It also needs to be in the root directory of the project
.gitignoreAdd... To the file.vscode
边栏推荐
- MySQL table partition creation method
- 记一次线上接口慢查询问题排查
- 【分类模型】Q 型聚类分析
- Mysql与Redis一致性解决方案
- Subclasses call methods and properties of the parent class with the same name
- 【图像处理】图像直方图均衡化系统含GUI界面
- How the esp32 deep sleep current is lower than 10uA
- Buildreoot override mechanism
- Product learning (II) - competitive product analysis
- 解决无法读取META-INF.services里面定义的类
猜你喜欢

Microsoft announces open source (Godel) language model chat robot

K8s set up redis cluster

运维面临挑战?智能运维管理系统来帮您
![[lingo] find the shortest path problem of undirected graph](/img/14/1ccae0f33f5857b546d7fd0aa74c35.png)
[lingo] find the shortest path problem of undirected graph
![[Tikhonov] image super-resolution reconstruction based on Tikhonov regularization](/img/49/719496e014f4766d22aba44dbed19e.png)
[Tikhonov] image super-resolution reconstruction based on Tikhonov regularization

Code practice - build your own diffusion models / score based generic models from scratch

JSP - paging

Challenges faced by operation and maintenance? Intelligent operation and maintenance management system to help you

JAX的深度学习和科学计算

iNFTnews | 从《雪崩》到百度“希壤”,元宇宙30年的16件大事
随机推荐
Is the account opening of GF Securities safe and reliable? How to open GF Securities Account
Ctfhub port scan (SSRF)
[Electrical dielectric number] electrical dielectric number and calculation considering HVDC and facts components
Paging in servlets and JSPS
C# Newtonsoft.Json中JObject的使用
DC-4靶机
Buildreoot override mechanism
Solution to the problem that objects in unity2021 scene view cannot be directly selected
【图像处理】图像直方图均衡化系统含GUI界面
How to use Alibaba vector font files through CDN
EasyNVS云管理平台功能重构:支持新增用户、修改信息等
用手机在指南针上开户靠谱吗?这样有没有什么安全隐患
如何制作专属的VS Code主题
Docker installation and deployment redis
Operation and maintenance management system, humanized operation experience
Pourquoi tant de gens sont - ils devenus des gestionnaires de produits? Quelles sont les perspectives de développement des gestionnaires de produits?
[image processing] image histogram equalization system with GUI interface
北漂程序员深夜emo发帖求助:女朋友走了我很孤独 ......
运维管理有什么实用的技巧吗
[recommendation technology] matlab simulation of network information recommendation technology based on collaborative filtering