vscode 标准库位置_如何在VSCode中使用标准

vscode 标准库位置

I use Visual Studio Code as my text editor. When I write JavaScript, I follow JavaScript Standard Style.There's an easy way to integrate Standard in VS Code—with the vscode-standardjs plugin. I made a video for this some time ago if you're interested in setting it up.But, if you follow the instructions in the video (or on vscode-standardjs's readme file), you'll come to notice there's one small detail that needs to be ironed out.Try writing a function the old way, and save it repeatedly. VS code will toggle between having and not having a space before the left-parenthesis of the function.

我使用Visual Studio Code作为文本编辑器。 在编写JavaScript时,我遵循的是JavaScript标准样式 。有一种简单的方法可以将vs 标准-js插件与VS Code集成。 如果您有兴趣设置视频 ,我前段时间制作了一个视频 。但是,如果您按照视频(或vscode-standardjs的自述文件)中的说明进行操作,您会发现其中有一个小细节需要解决的问题。尝试以旧方式编写function ,然后重复保存。 VS代码将在函数左括号前是否有空格之间切换。

VS code toggles between having and not having a space before '('.

You get the same problem when you write methods with the ES6 method shorthands:

使用ES6方法速记编写方法时,您会遇到相同的问题:

Same problem happens when you create methods with ES6 method shorthands.

There's a quick way to fix this issue. What you need to do is set javascript.format.enable to false. This disables VS Code's default Javascript formatter (and lets vscode-standandjs does the formatting work).

有一种快速解决此问题的方法。 您需要将javascript.format.enable设置为false 。 这将禁用VS Code的默认Javascript格式化程序(并让vscode-standandjs进行格式化工作)。

So the minimum configuration you need to get Standard and VS Code to work together is:

因此,使Standard和VS Code协同工作所需的最低配置为:

{// Prevents VS Code from formatting JavaScript with the default linter"javascript.format.enable": false,// Prevents VS Code linting JavaScript with the default linter"javascript.validate.enable": false,// Lints with Standard JS"standard.enable": true,// Format files with Standard whenever you save the file"standard.autoFixOnSave": true,// Files to validate with Standard JS"standard.validate": ["javascript","javascriptreact"]
}


This article was originally posted on my blog.Sign up for my newsletter if you want more articles to help you become a better frontend developer.

本文最初发布在我的博客上 。 如果您想获得更多文章来帮助您成为更好的前端开发人员,请注册我的时事通讯 。

翻译自: https://www.freecodecamp.org/news/https-zellwk-com-blog-standard-with-vscode/

vscode 标准库位置

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/391586.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

leetcode 1603. 设计停车系统

请你给一个停车场设计一个停车系统。停车场总共有三种不同大小的车位:大,中和小,每种尺寸分别有固定数目的车位。 请你实现 ParkingSystem 类: ParkingSystem(int big, int medium, int small) 初始化 ParkingSystem 类&#xf…

IBM量子计算新突破:成功构建50个量子比特原型机

本文来自AI新媒体量子位(QbitAI)IBM去年开始以云计算服务的形式提供量子计算能力。当时,IBM发布了包含5个量子比特的计算机。在短短18个月之后,IBM周五宣布,将发布包含20个量子比特的计算机。 IBM还宣布,该…

ChromeDriver与chrome对应关系

http://chromedriver.storage.googleapis.com/index.html 转载于:https://www.cnblogs.com/gcgc/p/11387605.html

快速排序和快速选择(quickSort and quickSelect)算法

排序算法:快速排序(quicksort)递归与非递归算法 TopK问题:快速选择(quickSelect)算法 import java.util.*; import java.lang.*;public class Demo {// 非递归 using stackpublic static void quickSortStack(int[] nums, int left, int right) {if (lef…

小程序点击地图气泡获取气泡_气泡上的气泡

小程序点击地图气泡获取气泡Combining two colors that are two steps apart on the Color Wheel creates a Diad Color Harmony. This Color Harmony is one of the lesser used ones. I decided to cover it here to add variety to your options for colorizing visualizati…

leetcode 150. 逆波兰表达式求值(栈)

根据 逆波兰表示法,求表达式的值。 有效的算符包括 、-、*、/ 。每个运算对象可以是整数,也可以是另一个逆波兰表达式。 说明: 整数除法只保留整数部分。 给定逆波兰表达式总是有效的。换句话说,表达式总会得出有效数值且不存在…

WebLogic常见问题

myeclipseweblogic10的配置,配置成功 运行中可能失败,由于weblogic10不稳定,重启机器后可以使用了 web工程使用到hibernate3时可能出现问题 ClassNotFoundException: org.hibernate.hql.ast.HqlToken 参考http://blog.chinajavaworld.com/ent…

PopTheBubble —测量媒体偏差的产品创意

产品管理 (Product Management) A couple of months ago, I decided to try something new. The MVP Lab by Mozilla is an 8-week incubator for pre-startup teams to explore product concepts and, over the 8 weeks of the program, ship a minimum viable product that p…

linux-Centos7安装nginx

首先配置linux环境,我这里是刚刚装好linux,所以一次性安装了一系列我需要到的环境; yum install pcre pcre-devel zlib zlib-devel openssl openssl-devel gd gd-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel e…

javascript原型_JavaScript原型初学者指南

javascript原型You cant get very far in JavaScript without dealing with objects. Theyre foundational to almost every aspect of the JavaScript programming language. In fact, learning how to create objects is probably one of the first things you studied when …

leetcode 73. 矩阵置零

给定一个 m x n 的矩阵,如果一个元素为 0 ,则将其所在行和列的所有元素都设为 0 。请使用 原地 算法。 进阶: 一个直观的解决方案是使用 O(mn) 的额外空间,但这并不是一个好的解决方案。 一个简单的改进方案是使用 O(m n) 的额…

elasticsearch,elasticsearch-service安装

在Windows上安装Elasticsearch.zip 1 安装条件 安装需具备java 8或更高版本;官方的Oracle发行版,只需安装JDKElasticsearch的ZIP安装包——安装包地址 2 如何安装 Elasticsearch 傻瓜式的点下一步即可, java 注意环境变量配置 3 如何判断安装…

图表可视化seaborn风格和调色盘

seaborn是基于matplotlib的python数据可视化库,提供更高层次的API封装,包括一些高级图表可视化等工具。 使用seaborn需要先安装改模块pip3 install seaborn 。 一、风格style 包括set() / set_style() / axes_style() / despine() / set_context() 创建正…

面向Tableau开发人员的Python简要介绍(第3部分)

用PYTHON探索数据 (EXPLORING DATA WITH PYTHON) One of Tableau’s biggest advantages is how it lets you swim around in your data. You don’t always need a fine-tuned dashboard to find meaningful insights, so even someone with quite a basic understanding of T…

leetcode 191. 位1的个数(位运算)

编写一个函数,输入是一个无符号整数(以二进制串的形式),返回其二进制表达式中数字位数为 ‘1’ 的个数(也被称为汉明重量)。 提示: 请注意,在某些语言(如 Java&#xf…

7、芯片发展

第一台继电器式计算机由康德拉.楚泽制造(1910-1995),这台机器使用了二进制数,但早期版本中使用的是机械存储器而非继电器,使用老式35毫米电影胶片进行穿孔编程。 同一时期,哈佛大学研究生霍华德.艾肯 要寻找…

seaborn分布数据可视化:直方图|密度图|散点图

系统自带的数据表格(存放在github上https://github.com/mwaskom/seaborn-data),使用时通过sns.load_dataset(表名称)即可,结果为一个DataFrame。 print(sns.get_dataset_names()) #获取所有数据表名称 # [anscombe, attention, …

如何成为一个优秀的程序员_如何成为一名优秀的程序员

如何成为一个优秀的程序员by Amy M Haddad通过艾米M哈达德(Amy M Haddad) 如何成为一名优秀的程序员 (How to be a great programmer) What sets apart the really great programmers?是什么使真正出色的程序员与众不同? As we all know, great programmers buil…

pymc3使用_使用PyMC3了解飞机事故趋势

pymc3使用Visually exploring historic airline accidents, applying frequentist interpretations and validating changing trends with PyMC3.使用PyMC3直观地浏览历史性航空事故,应用常识性解释并验证变化趋势。 前言 (Preface) On the 7th of August this yea…

视频监控业务上云方案解析

摘要:阿里云针对安防监控服务在传统IT架构下面临的上述问题,基于阿里云存储服务,提供视频监控解决方案。从2015年推出视频监控存储与播放解决方案以来,帮助大量的视频监控企业解决了上云的过程中遇到的问题,针对不同的…