vscode 标准库位置_如何在VSCode中使用标准
vscode 標(biāo)準(zhǔn)庫位置
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時(shí),我遵循的是JavaScript標(biāo)準(zhǔn)樣式 。有一種簡單的方法可以將vs 標(biāo)準(zhǔn)-js插件與VS Code集成。 如果您有興趣設(shè)置視頻 ,我前段時(shí)間制作了一個(gè)視頻 。但是,如果您按照視頻(或vscode-standardjs的自述文件)中的說明進(jìn)行操作,您會(huì)發(fā)現(xiàn)其中有一個(gè)小細(xì)節(jié)需要解決的問題。嘗試以舊方式編寫function ,然后重復(fù)保存。 VS代碼將在函數(shù)左括號(hào)前是否有空格之間切換。
You get the same problem when you write methods with the ES6 method shorthands:
使用ES6方法速記編寫方法時(shí),您會(huì)遇到相同的問題:
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設(shè)置為false 。 這將禁用VS Code的默認(rèn)Javascript格式化程序(并讓vscode-standandjs進(jìn)行格式化工作)。
So the minimum configuration you need to get Standard and VS Code to work together is:
因此,使Standard和VS Code協(xié)同工作所需的最低配置為:
{// 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.
本文最初發(fā)布在我的博客上 。 如果您想獲得更多文章來幫助您成為更好的前端開發(fā)人員,請(qǐng)注冊(cè)我的時(shí)事通訊 。
翻譯自: https://www.freecodecamp.org/news/https-zellwk-com-blog-standard-with-vscode/
vscode 標(biāo)準(zhǔn)庫位置
總結(jié)
以上是生活随笔為你收集整理的vscode 标准库位置_如何在VSCode中使用标准的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 梦到老公牙齿掉好几个
- 下一篇: 如何成为一个优秀的程序员_如何成为一名优