若是在一個大型項目中會有多我的一塊兒去開發,爲了使每一個人寫的代碼格式都保持一致,就須要藉助軟件去幫咱們保存文件的時候,本身格式化代碼javascript
解決辦法:vscode軟件下載一個ESLint,在到設置裏面找到setting.json文件,將下面的配置粘貼複製拷貝到文件中就能夠了,so easy~php
{ // 當其前綴匹配時插入代碼段。當 "quickSuggestions" 未啓用時,效果最佳。 "editor.tabCompletion": false, // 控制字體系列。 "editor.fontFamily": "Consolas, 'Courier New', monospace", // 控制字體粗細。 "editor.fontWeight": "normal", // 以像素爲單位控制字號。 "editor.fontSize": 14, // 控制行高。使用 0 經過字號計算行高。 "editor.lineHeight": 0, // 控制行號的顯示。可能的值爲「開」、「關」和「相對」。「相對」將顯示從當前光標位置開始計數的行數。 "editor.lineNumbers": "on", // 顯示垂直標尺的列 "editor.rulers": [], // 執行文字相關的導航或操做時將用做文字分隔符的字符 "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?", // 一個製表符等於的空格數。該設置在 `editor.detectIndentation` 啓用時根據文件內容進行重寫。 "editor.tabSize": 2, // 按 "Tab" 時插入空格。該設置在 `editor.detectIndentation` 啓用時根據文件內容進行重寫。 "editor.insertSpaces": true, // 當打開文件時,將基於文件內容檢測 "editor.tabSize" 和 "editor.insertSpaces"。 "editor.detectIndentation": true, // 控制選取範圍是否有圓角 "editor.roundedSelection": true, // 控制編輯器是否能夠滾動到最後一行以後 "editor.scrollBeyondLastLine": true, // 控制是否顯示 minimap "editor.minimap.enabled": false, // 呈現某行上的實際字符(與顏色塊相反) "editor.minimap.renderCharacters": true, // 限制最小映射的寬度,儘可能多地呈現特定數量的列 "editor.minimap.maxColumn": 120, // 控制換行方式。能夠選擇: // - 「off」 (禁用換行), // - 「on」 (視區換行), // - 「wordWrapColumn」 (在 "editor.wordWrapColumn" 處換行`) 或 // - 「bounded」 (在視區和 "editor.wordWrapColumn" 中的最小值處換行)。 "editor.wordWrap": "off", // 在 "editor.wordWrap" 爲 "wordWrapColumn" 或 "bounded" 時控制編輯器列的換行。 "editor.wordWrapColumn": 80, // 控制換行的行的縮進。能夠是\\"none\\"、 \\"same\\" 或 \\"indent\\"。 "editor.wrappingIndent": "same", // 要對鼠標滾輪滾動事件的 "deltaX" 和 "deltaY" 使用的乘數 "editor.mouseWheelScrollSensitivity": 1, // 控制鍵入時是否應自動顯示建議 "editor.quickSuggestions": { "other": true, "comments": false, "strings": false }, // 控制延遲多少毫秒後將顯示快速建議 "editor.quickSuggestionsDelay": 10, // 啓用參數提示 "editor.parameterHints": true, // 控制編輯器是否應該在左括號後自動插入右括號 "editor.autoClosingBrackets": true, // 控制編輯器是否應在鍵入後自動設置行的格式 "editor.formatOnType": false, // 控制編輯器是否應自動設置粘貼內容的格式。格式化程序必須可用而且能設置文檔中某一範圍的格式。 "editor.formatOnPaste": false, // 控制鍵入觸發器字符時是否應自動顯示建議 "editor.suggestOnTriggerCharacters": true, // 控制除了 "Tab" 鍵之外,是否還應在遇到 "Enter" 鍵時接受建議。幫助避免「插入新行」或「接受建議」之間出現歧義。 "editor.acceptSuggestionOnEnter": true, // 控制是否應在遇到提交字符時接受建議。例如,在 JavaScript 中,分號(";")能夠爲提交字符,可接受建議並鍵入該字符。 "editor.acceptSuggestionOnCommitCharacter": true, // 控制是否將代碼段與其餘建議一塊兒顯示以及它們的排序方式。 "editor.snippetSuggestions": "inline", // 控制沒有選擇內容的複製是否複製當前行。 "editor.emptySelectionClipboard": true, // 控制是否應根據文檔中的字數計算完成。 "editor.wordBasedSuggestions": true, // 建議小組件的字號 "editor.suggestFontSize": 0, // 建議小組件的行高 "editor.suggestLineHeight": 0, // 控制編輯器是否應突出顯示選項的近似匹配 "editor.selectionHighlight": true, // 控制編輯器是否應該突出顯示語義符號次數 "editor.occurrencesHighlight": true, // 控制可在概述標尺同一位置顯示的效果數量 "editor.overviewRulerLanes": 3, // 控制概述標尺周圍是否要繪製邊框。 "editor.overviewRulerBorder": true, // 控制光標動畫樣式,可能的值爲 "blink"、"smooth"、"phase"、"expand" 和 "solid" "editor.cursorBlinking": "blink", // 經過使用鼠標滾輪同時按住 Ctrl 可縮放編輯器的字體 "editor.mouseWheelZoom": false, // 控制光標樣式,接受的值爲 "block"、"block-outline"、"line"、"line-thin" 、"underline" 和 "underline-thin" "editor.cursorStyle": "line", // 啓用字體連字 "editor.fontLigatures": false, // 控制光標是否應隱藏在概述標尺中。 "editor.hideCursorInOverviewRuler": false, // 控制編輯器中呈現空白字符的方式,可能爲「無」、「邊界」和「所有」。「邊界」選項不會在單詞之間呈現單空格。 "editor.renderWhitespace": "none", // 控制編輯器是否應呈現控制字符 "editor.renderControlCharacters": false, // 控制編輯器是否應呈現縮進參考線 "editor.renderIndentGuides": false, // 控制編輯器應如何呈現當前行突出顯示,可能爲「無」、「裝訂線」、「線」和「所有」。 "editor.renderLineHighlight": "line", // 控制編輯器是否顯示代碼濾鏡 "editor.codeLens": true, // 控制編輯器是否啓用代碼摺疊功能 "editor.folding": true, // 當選擇其中一項時,將突出顯示匹配的括號。 "editor.matchBrackets": true, // 控制編輯器是否應呈現垂直字形邊距。字形邊距最經常使用於調試。 "editor.glyphMargin": true, // 在製表位後插入和刪除空格 "editor.useTabStops": true, // 刪除尾隨自動插入的空格 "editor.trimAutoWhitespace": true, // 即便在雙擊編輯器內容或按 Esc 鍵時,也要保持速覽編輯器的打開狀態。 "editor.stablePeek": false, // 控制編輯器是否應該容許經過拖放移動所選項。 "editor.dragAndDrop": false, // 控制 Diff 編輯器以並排或內聯形式顯示差別 "diffEditor.renderSideBySide": true, // 控制差別編輯器是否將對前導空格或尾隨空格的更改顯示爲差別 "diffEditor.ignoreTrimWhitespace": true, // 控制差別編輯器是否爲已添加/刪除的更改顯示 +/- 指示符號 "diffEditor.renderIndicators": true, // 啓用後,按 TAB 鍵時,將展開 Emmet 縮寫。 "emmet.triggerExpansionOnTab": true, // 用於修改 Emmet 的某些操做和解決程序的首選項。 "emmet.preferences": {}, // 爲指定的語法定義配置文件或使用帶有特定規則的配置文件。 "emmet.syntaxProfiles": {}, // emmet 縮寫不該在其中展開的語言數組。 "emmet.excludeLanguages": ["markdown"], // 轉至包含 Emmet 配置文件、片斷和首選項的文件的路徑 "emmet.extensionsPath": null, // 啓用後,當沒有打開編輯器時將顯示水印提示。 "workbench.tips.enabled": true, // 控制打開的編輯器是否顯示在選項卡中。 "workbench.editor.showTabs": true, // 控制編輯器的選項卡關閉按鈕的位置,或當設置爲 "off" 時禁用關閉它們。 "workbench.editor.tabCloseButton": "right", // 控制打開的編輯器是否隨圖標一塊兒顯示。這還需啓用圖標主題。 "workbench.editor.showIcons": true, // 控制打開的編輯器是否顯示爲預覽。預覽編輯器能夠從新使用,直到將其保留(例如,雙擊或編輯)。 "workbench.editor.enablePreview": true, // 控制 Quick Open 中打開的編輯器是否顯示爲預覽。預覽編輯器能夠從新使用,直到將其保留(例如,經過雙擊或編輯)。 "workbench.editor.enablePreviewFromQuickOpen": true, // 控制打開編輯器的位置。選擇「左側」或「右側」以在當前活動位置的左側或右側打開編輯器。選擇「第一個」或「最後一個」以從當前活動位置獨立打開編輯器。 "workbench.editor.openPositioning": "right", // 控制打開時編輯器是否顯示在任何可見組中。若是禁用,編輯器會優先在當前活動編輯器組中打開。若是啓用,會顯示已打開的編輯器而不是在當前活動編輯器組中再次打開。請注意,有些狀況下會忽略此設置,例如強制編輯器在特定組中或在當前活動組的邊側打開時。 "workbench.editor.revealIfOpen": false, // 控制 Quick Open 是否應在失去焦點時自動關閉。 "workbench.quickOpen.closeOnFocusLost": true, // 控制打開設置時是否打開顯示全部默認設置的編輯器。 "workbench.settings.openDefaultSettings": true, // 控制邊欄的位置。它可顯示在工做臺的左側或右側。 "workbench.sideBar.location": "left", // 控制工做臺底部狀態欄的可見性。 "workbench.statusBar.visible": true, // 控制工做臺中活動欄的可見性。 "workbench.activityBar.visible": true, // 控制文件被其餘某些進程刪除或重命名時是否應該自動關閉顯示文件的編輯器。禁用此項會保持編輯器做爲此類事件的髒文件打開。請注意,從應用程序內部進行刪除操做會始終關閉編輯器,而且髒文件始終不會關閉以保存數據。 "workbench.editor.closeOnFileDelete": true, // 啓用後,將在啓動時顯示歡迎頁。 "workbench.welcome.enabled": true, // Specifies the color theme used in the workbench. "workbench.colorTheme": "Default Dark+", // Specifies the icon theme used in the workbench. "workbench.iconTheme": "vscode-icons", // 覆蓋當前所選顏色主題的顏色。 "workbench.colorCustomizations": {}, // 控制是否應在新窗口中打開文件。 // - default: 文件將在該文件的文件夾打開的窗口中打開,或在上一個活動窗口中打開,除非該文件經過平臺或從查找程序(僅限 macOS)打開 // - on: 文件將在新窗口中打開 // - off: 文件將在該文件的文件夾打開的窗口中打開,或在上一個活動窗口中打開 // 注意,可能仍會存在忽略此設置的狀況(例如當使用 -new-window 或 -reuse-window 命令行選項時)。 "window.openFilesInNewWindow": "default", // 控制文件夾應在新窗口中打開仍是替換上一活動窗口。 // - default: 文件夾將在新窗口中打開,除非文件是從應用程序內選取的(例如經過「文件」菜單) // - on: 文件夾將在新窗口中打開 // - off: 文件夾將替換上一活動窗口 // 注意,可能仍會存在忽略此設置的狀況(例如當使用 -new-window 或 -reuse-window 命令行選項時)。 "window.openFoldersInNewWindow": "default", // 控制重啓後從新打開文件夾的方式。選擇「none」表示永不從新打開文件夾,選擇「one」表示從新打開最後使用的一個文件夾,或選擇「all」表示打開上次會話的全部文件夾。 "window.reopenFolders": "one", // 若是窗口已退出全屏模式,控制其是否應還原爲全屏模式。 "window.restoreFullscreen": false, // 調整窗口的縮放級別。原始大小是 0,每次遞增(例如 1)或遞減(例如 -1)表示放大或縮小 20%。也能夠輸入小數以便以更精細的粒度調整縮放級別。 "window.zoomLevel": 0, // 基於活動編輯器控制窗口標題。基於上下文替換變量: // ${activeEditorShort}: 例如 myFile.txt // ${activeEditorMedium}:例如 myFolder/myFile.txt // ${activeEditorLong}: 例如 /Users/Development/myProject/myFolder/myFile.txt // ${rootName}: 例如 myProject // ${rootPath}: 例如 /Users/Development/myProject // ${appName}: 例如 VS Code // ${dirty}: 一個更新指示器,指示活動編輯器是否更新 // ${separator}: 一個條件分隔符("-"),僅在左右是具備值的變量時才顯示 "window.title": "${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}", // 控制打開新窗口的尺寸。默認狀況下,新窗口將以小尺寸在屏幕的中央打開。當設置爲 "inherit" 時,窗口將獲取與上一活動窗口相同的尺寸。當設置爲 "maximized" 時,窗口將以最大化形式打開,若是配置爲 "fullscreen",窗口將以全屏形式打開。 "window.newWindowDimensions": "default", // 控制菜單欄的可見性。「切換」設置表示隱藏菜單欄,按一次 Alt 鍵則將顯示此菜單欄。默認狀況下,除非窗口爲全屏,不然菜單欄可見。 "window.menuBarVisibility": "default", // 若是已啓用,將自動更改成高對比度主題;若是 Windows 正在使用高對比度主題,則當離開 Windows 高對比度主題時會更改成深色主題。 "window.autoDetectHighContrast": true, // 配置 glob 模式以排除文件和文件夾。 "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true }, // 配置語言的文件關聯(如: "*.extension": "html")。這些關聯的優先級高於已安裝語言的默認關聯。 "files.associations": { "*.js": "javascriptreact", "*.wpy": "vue" }, // 讀取和編寫文件時將使用的默認字符集編碼。 "files.encoding": "utf8", // 啓用時,會在打開文件時嘗試猜想字符集編碼 "files.autoGuessEncoding": false, // 默認行尾字符。 "files.eol": "\r\n", // 啓用後,將在保存文件時剪裁尾隨空格。 "files.trimTrailingWhitespace": false, // 啓用後,保存文件時在文件末尾插入一個最終新行。 "files.insertFinalNewline": false, // 控制已更新文件的自動保存。接受的值:「off」、"afterDelay」、「onFocusChange」(編輯器失去焦點)、「onWindowChange」(窗口失去焦點)。若是設置爲「afterDelay」,則可在 "files.autoSaveDelay" 中配置延遲。 "files.autoSave": "off", // 控制延遲(以秒爲單位),在該延遲後將自動保存更新後的文件。僅在 "files.autoSave'" 設置爲「afterDelay」時適用。 "files.autoSaveDelay": 1000, // 配置文件路徑的 glob 模式以從文件監視排除。更改此設置要求重啓。若是在啓動時遇到 Code 消耗大量 CPU 時間,則能夠排除大型文件夾以減小初始加載。 "files.watcherExclude": { "**/.git/objects/**": true, "**/node_modules/**": true }, // 控制是否在會話間記住未保存的文件,以容許在退出編輯器時跳過保存提示。 "files.hotExit": "onExit", // 分配給新文件的默認語言模式。 "files.defaultLanguage": "", // 控制打開 Zen Mode 是否也會將工做臺置於全屏模式。 "zenMode.fullScreen": true, // 控制打開 Zen 模式是否也會隱藏工做臺選項卡。 "zenMode.hideTabs": true, // 控制打開 Zen 模式是否也會隱藏工做臺底部的狀態欄。 "zenMode.hideStatusBar": true, // 控制打開 Zen 模式是否也會隱藏工做臺左側的活動欄。 "zenMode.hideActivityBar": true, // 控制若是某窗口已退出 zen 模式,是否應還原到 zen 模式。 "zenMode.restore": false, // 在「打開的編輯器」窗格中顯示的編輯器數量。將其設置爲 0 可隱藏窗格。 "explorer.openEditors.visible": 9, // 控制打開的編輯器部分的高度是否應動態適應元素數量。 "explorer.openEditors.dynamicHeight": true, // 控制資源管理器是否應在打開文件時自動顯示並選擇它們。 "explorer.autoReveal": true, // 控制資源管理器是否應該容許經過拖放移動文件和文件夾。 "explorer.enableDragAndDrop": true, // 配置 glob 模式以在搜索中排除文件和文件夾。從 files.exclude 設置中繼承全部 glob 模式。 "search.exclude": { "**/node_modules": true, "**/bower_components": true }, // 控制是否在文本搜索中使用 ripgrep "search.useRipgrep": true, // 控制在新工做區中搜索時是否默認使用 .gitignore 和 .ignore 文件。 "search.useIgnoreFilesByDefault": false, // 配置爲在 Quick Open 文件結果中包括全局符號搜索的結果。 "search.quickOpen.includeSymbols": false, // 配置是否從更新通道接收自動更新。更改後須要重啓。 "update.channel": "default", // 要使用的代理設置。若是還沒有設置,則將從 http_proxy 和 https_proxy 環境變量獲取 "http.proxy": "", // 是否應根據提供的 CA 列表驗證代理服務器證書。 "http.proxyStrictSSL": true, // 要做爲每一個網絡請求的 "Proxy-Authorization" 標頭髮送的值。 "http.proxyAuthorization": null, // Controls CSS validation and problem severities. // 啓用或禁用全部驗證 "css.validate": true, // 啓用或禁用顏色修飾器 "css.colorDecorators.enable": true, // 使用供應商特定前綴時,確保同時包括全部其餘供應商特定屬性 "css.lint.compatibleVendorPrefixes": "ignore", // 使用供應商特定前綴時,還應包括標準屬性 "css.lint.vendorPrefix": "warning", // 不要使用重複的樣式定義 "css.lint.duplicateProperties": "ignore", // 不要使用空規則集 "css.lint.emptyRules": "warning", // Import 語句不會並行加載 "css.lint.importStatement": "ignore", // 使用邊距或邊框時,不要使用寬度或高度 "css.lint.boxModel": "ignore", // 已知通配選擇符 (*) 慢 "css.lint.universalSelector": "ignore", // 零不須要單位 "css.lint.zeroUnits": "ignore", // @font-face 規則必須定義 "src" 和 "font-family" 屬性 "css.lint.fontFaceProperties": "warning", // 十六進制顏色必須由三個或六個十六進制數字組成 "css.lint.hexColorLength": "error", // 參數數量無效 "css.lint.argumentsInColorFunction": "error", // 未知的屬性。 "css.lint.unknownProperties": "warning", // 僅當支持 IE7 及更低版本時,才須要 IE hack "css.lint.ieHack": "ignore", // By default, create file username // 未知的供應商特定屬性。 "css.lint.unknownVendorSpecificProperties": "ignore", // 因顯示而忽略屬性。例如,使用 "display: inline"時,寬度、高度、上邊距、下邊距和 float 屬性將不起做用 "css.lint.propertyIgnoredDueToDisplay": "warning", // 避免使用 !important。它代表整個 CSS 的特異性已經失去控制且須要重構。 "css.lint.important": "ignore", // 避免使用「float」。浮動會帶來脆弱的 CSS,若是佈局的某一方面更改,將很容易破壞 CSS。 "css.lint.float": "ignore", // 選擇器不該包含 ID,由於這些規則與 HTML 的耦合過於緊密。 "css.lint.idSelector": "ignore", // Traces the communication between VS Code and the CSS language server. "css.trace.server": "off", // Controls SCSS validation and problem severities. // 啓用或禁用全部驗證 "scss.validate": true, // 啓用或禁用顏色修飾器 "scss.colorDecorators.enable": true, // 使用供應商特定前綴時,確保同時包括全部其餘供應商特定屬性 "scss.lint.compatibleVendorPrefixes": "ignore", // 使用供應商特定前綴時,還應包括標準屬性 "scss.lint.vendorPrefix": "warning", // 不要使用重複的樣式定義 "scss.lint.duplicateProperties": "ignore", // 不要使用空規則集 "scss.lint.emptyRules": "warning", // Import 語句不會並行加載 "scss.lint.importStatement": "ignore", // 使用邊距或邊框時,不要使用寬度或高度 "scss.lint.boxModel": "ignore", // 已知通配選擇符 (*) 慢 "scss.lint.universalSelector": "ignore", // 零不須要單位 "scss.lint.zeroUnits": "ignore", // @font-face 規則必須定義 "src" 和 "font-family" 屬性 "scss.lint.fontFaceProperties": "warning", // 十六進制顏色必須由三個或六個十六進制數字組成 "scss.lint.hexColorLength": "error", // 參數數量無效 "scss.lint.argumentsInColorFunction": "error", // 未知的屬性。 "scss.lint.unknownProperties": "warning", // 僅當支持 IE7 及更低版本時,才須要 IE hack "scss.lint.ieHack": "ignore", // 未知的供應商特定屬性。 "scss.lint.unknownVendorSpecificProperties": "ignore", // 因顯示而忽略屬性。例如,使用 "display: inline"時,寬度、高度、上邊距、下邊距和 float 屬性將不起做用 "scss.lint.propertyIgnoredDueToDisplay": "warning", // 避免使用 !important。它代表整個 CSS 的特異性已經失去控制且須要重構。 "scss.lint.important": "ignore", // 避免使用「float」。浮動會帶來脆弱的 CSS,若是佈局的某一方面更改,將很容易破壞 CSS。 "scss.lint.float": "ignore", // 選擇器不該包含 ID,由於這些規則與 HTML 的耦合過於緊密。 "scss.lint.idSelector": "ignore", // Controls LESS validation and problem severities. // 啓用或禁用全部驗證 "less.validate": true, // 啓用或禁用顏色修飾器 "less.colorDecorators.enable": true, // 使用供應商特定前綴時,確保同時包括全部其餘供應商特定屬性 "less.lint.compatibleVendorPrefixes": "ignore", // 使用供應商特定前綴時,還應包括標準屬性 "less.lint.vendorPrefix": "warning", // 不要使用重複的樣式定義 "less.lint.duplicateProperties": "ignore", // 不要使用空規則集 "less.lint.emptyRules": "warning", // Import 語句不會並行加載 "less.lint.importStatement": "ignore", // 使用邊距或邊框時,不要使用寬度或高度 "less.lint.boxModel": "ignore", // 已知通配選擇符 (*) 慢 "less.lint.universalSelector": "ignore", // 零不須要單位 "less.lint.zeroUnits": "ignore", // @font-face 規則必須定義 "src" 和 "font-family" 屬性 "less.lint.fontFaceProperties": "warning", // 十六進制顏色必須由三個或六個十六進制數字組成 "less.lint.hexColorLength": "error", // 參數數量無效 "less.lint.argumentsInColorFunction": "error", // 未知的屬性。 "less.lint.unknownProperties": "warning", // 僅當支持 IE7 及更低版本時,才須要 IE hack "less.lint.ieHack": "ignore", // 未知的供應商特定屬性。 "less.lint.unknownVendorSpecificProperties": "ignore", // 因顯示而忽略屬性。例如,使用 "display: inline"時,寬度、高度、上邊距、下邊距和 float 屬性將不起做用 "less.lint.propertyIgnoredDueToDisplay": "warning", // 避免使用 !important。它代表整個 CSS 的特異性已經失去控制且須要重構。 "less.lint.important": "ignore", // 避免使用「float」。浮動會帶來脆弱的 CSS,若是佈局的某一方面更改,將很容易破壞 CSS。 "less.lint.float": "ignore", // 選擇器不該包含 ID,由於這些規則與 HTML 的耦合過於緊密。 "less.lint.idSelector": "ignore", // 容許在任何文件中設置斷點 "debug.allowBreakpointsEverywhere": false, // 調試會話結束時自動打開資源管理器視圖 "debug.openExplorerOnEnd": false, // 調試時,在編輯器中顯示變量值內聯 "debug.inlineValues": false, // 控制是否應該隱藏浮點調試操做欄 "debug.hideActionBar": false, // 全局的調試啓動配置。應用做跨工做區共享的 "launch.json" 的替代。 "launch": {}, // 啓用/禁用默認 HTML 格式化程序(須要重啓) "html.format.enable": true, // 每行最大字符數(0 = 禁用)。 "html.format.wrapLineLength": 120, // 以逗號分隔的標記列表不該重設格式。"null" 默認爲全部列於 https://www.w3.org/TR/html5/dom.html#phrasing-content 的標記。 "html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var", // 以逗號分隔的標記列表,不該在其中從新設置內容的格式。"null" 默認爲 "pre" 標記。 "html.format.contentUnformatted": "pre", // 縮進 <head> 和 <body> 部分。 "html.format.indentInnerHtml": false, // 是否要保留元素前面的現有換行符。僅適用於元素前,不適用於標記內或文本。 "html.format.preserveNewLines": true, // 要保留在一個區塊中的換行符的最大數量。對於無限制使用 "null"。 "html.format.maxPreserveNewLines": null, // 格式和縮進 {{#foo}} 和 {{/foo}}。 "html.format.indentHandlebars": false, // 以新行結束。 "html.format.endWithNewline": false, // 標記列表,以逗號分隔,其前應有額外新行。"null" 默認爲「標頭、正文、/html」。 "html.format.extraLiners": "head, body, /html", // 對屬性進行換行。 "html.format.wrapAttributes": "auto", // 配置內置 HTML 語言支持是否建議 Angular V1 標記和屬性。 "html.suggest.angular1": true, // 配置內置 HTML 語言支持是否建議 Ionic 標記、屬性和值。 "html.suggest.ionic": true, // 配置內置 HTML 語言支持是否建議 HTML5 標記、屬性和值。 "html.suggest.html5": true, // 配置內置的 HTML 語言支持是否對嵌入的腳本進行驗證。 "html.validate.scripts": true, // 配置內置的 HTML 語言支持是否對嵌入的樣式進行驗證。 "html.validate.styles": true, // Traces the communication between VS Code and the HTML language server. "html.trace.server": "off", // 將當前項目中的 JSON 文件與架構關聯起來 "json.schemas": [], // 啓用/禁用默認 JSON 格式化程序(須要重啓) "json.format.enable": true, // 跟蹤 VS Code 與 JSON 語言服務器之間的通訊。 "json.trace.server": "off", // 啓用或禁用顏色修飾器 "json.colorDecorators.enable": true, // 要在 Markdown 預覽中使用的 CSS 樣式表的 URL 或本地路徑列表。相對路徑被解釋爲相對於資源管理器中打開的文件夾。若是沒有任何打開的文件夾,則會被解釋爲相對於 Markdown 文件的位置。全部的 "\" 需寫爲 "\\"。 "markdown.styles": [], // 設置如何在 Markdown 預覽中呈現 YAML 扉頁。「隱藏」會刪除扉頁。不然,扉頁則被視爲 Markdown 內容。 "markdown.previewFrontMatter": "hide", // 控制 Markdown 預覽中使用的字體系列。 "markdown.preview.fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", // 控制 Markdown 預覽中使用的字號(以像素爲單位)。 "markdown.preview.fontSize": 14, // 控制 Markdown 預覽中使用的行高。此數值與字號相關。 "markdown.preview.lineHeight": 1.6, // 滾動 Markdown 預覽以顯示編輯器中當前所選的行。 "markdown.preview.scrollPreviewWithEditorSelection": true, // 在 Markdown 預覽中標記當前的編輯器選定內容。 "markdown.preview.markEditorSelection": true, // 當 Markdown 預覽滾動時,更新編輯器的視圖。 "markdown.preview.scrollEditorWithPreview": true, // 在 Markdown 預覽中雙擊切換到編輯器。 "markdown.preview.doubleClickToSwitchToEditor": true, // [實驗功能] 容許擴展程序來擴展 Markdown 預覽功能。 "markdown.enableExperimentalExtensionApi": false, // 對 Markdown 擴展啓用調試日誌記錄。 "markdown.trace": "off", // 若是已啓用內置 PHP 語言建議,則進行配置。此支持建議 PHP 全局變量和變量。 "php.suggest.basic": true, // 啓用/禁用內置的 PHP 驗證。 "php.validate.enable": true, // 指向 PHP 可執行文件。 "php.validate.executablePath": null, // 無論 linter 是在 save 仍是在 type 上運行。 "php.validate.run": "onSave", // 指定包含要使用的 tsserver 和 lib*.d.ts 文件的文件夾路徑。 "typescript.tsdk": null, // 禁用自動獲取類型。須要 TypeScript >= 2.0.6,而且更改後須要重啓。 "typescript.disableAutomaticTypeAcquisition": false, // 檢查全局安裝的 TypeScript 編譯器(例如 tsc )是否不一樣於使用的 TypeScript 語言服務。 "typescript.check.tscVersion": true, // 檢查是否安裝了 NPM 以進行自動 typings 獲取 "typescript.check.npmIsInstalled": true, // 啓用/禁用引用 CodeLens。要求 TypeScript >= 2.0.6。 "typescript.referencesCodeLens.enabled": false, // 啓用/禁用實現 CodeLens。要求 TypeScript >= 2.2.0。 "typescript.implementationsCodeLens.enabled": false, // 將 TS 服務器的日誌保存到一個文件。此日誌可用於診斷 TS 服務器問題。日誌可能包含你的項目中的文件路徑、源代碼和其餘可能敏感的信息。 "typescript.tsserver.log": "off", // 對發送到 TS 服務器的消息啓用跟蹤。此跟蹤信息可用於診斷 TS 服務器問題。 跟蹤信息可能包含你的項目中的文件路徑、源代碼和其餘可能敏感的信息。 "typescript.tsserver.trace": "off", // 完成函數的參數簽名。 "typescript.useCodeSnippetsOnMethodSuggest": false, // 啓用/禁用 TypeScript 驗證。 "typescript.validate.enable": true, // 啓用/禁用默認 TypeScript 格式化程序。 "typescript.format.enable": true, // 定義逗號分隔符後面的空格處理。 "typescript.format.insertSpaceAfterCommaDelimiter": true, // 在 For 語句中,定義分號後面的空格處理。 "typescript.format.insertSpaceAfterSemicolonInForStatements": true, // 定義二進制運算符後面的空格處理 "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": true, // 定義控制流語句中關鍵字後面的空格處理。 "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": true, // 定義匿名函數的函數關鍵字後面的空格處理。 "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, // 在函數參數括號前定義空格處理。須要 TypeScript >= 2.1.5。 "typescript.format.insertSpaceBeforeFunctionParenthesis": false, // 定義非空圓括號的左括號後面和右括號前面的空格處理。 "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, // 定義非空方括號的左括號後面和右括號前面的空格處理。 "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, // 定義非空括號的左括號後面和右括號前面的空格處理。要求 TypeScript >= 2.3.0。 "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, // 定義模板字符串的左括號後面和右括號前面的空格處理。要求 TypeScript >= 2.0.6。 "typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, // 定義 JSX 表達式左括號後面和右括號前面的空格處理。要求 TypeScript >= 2.0.6。 "typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, // 定義函數的左大括號是否放置在新的一行。 "typescript.format.placeOpenBraceOnNewLineForFunctions": false, // 定義控制塊的左括號是否放置在新的一行。 "typescript.format.placeOpenBraceOnNewLineForControlBlocks": false, // 啓用/禁用 JavaScript 驗證。 "javascript.validate.enable": true, // 啓用/禁用 JavaScript 格式化程序。 "javascript.format.enable": true, // 定義逗號分隔符後面的空格處理。 "javascript.format.insertSpaceAfterCommaDelimiter": true, // 在 For 語句中,定義分號後面的空格處理。 "javascript.format.insertSpaceAfterSemicolonInForStatements": true, // 定義二進制運算符後面的空格處理 "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": true, // 定義控制流語句中關鍵字後面的空格處理。 "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": true, // 定義匿名函數的函數關鍵字後面的空格處理。 "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, // 在函數參數括號前定義空格處理。須要 TypeScript >= 2.1.5。 "javascript.format.insertSpaceBeforeFunctionParenthesis": false, // 定義非空圓括號的左括號後面和右括號前面的空格處理。 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, // 定義非空方括號的左括號後面和右括號前面的空格處理。 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, // 定義非空括號的左括號後面和右括號前面的空格處理。要求 TypeScript >= 2.3.0。 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, // 定義模板字符串的左括號後面和右括號前面的空格處理。要求 TypeScript >= 2.0.6。 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, // 定義 JSX 表達式左括號後面和右括號前面的空格處理。要求 TypeScript >= 2.0.6。 "javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, // 定義函數的左大括號是否放置在新的一行。 "javascript.format.placeOpenBraceOnNewLineForFunctions": false, // 定義控制塊的左括號是否放置在新的一行。 "javascript.format.placeOpenBraceOnNewLineForControlBlocks": false, // 啓用/禁用自動 JSDoc 註釋 "jsDocCompletion.enabled": true, // 啓用/禁用 JavaScript 文件的語義檢查。現有的 jsconfig.json 或 // tsconfig.json 文件會覆蓋此設置。要求 TypeScript >=2.3.1。 "javascript.implicitProjectConfig.checkJs": false, // 自動更新擴展 "extensions.autoUpdate": false, // 終端在 Linux 上使用的 shell 的路徑。 "terminal.integrated.shell.linux": "sh", // 在 Linux 終端上時要使用的命令行參數。 "terminal.integrated.shellArgs.linux": [], // 終端在 OS X 上使用的 shell 的路徑。 "terminal.integrated.shell.osx": "sh", // 在 OS X 終端上時要使用的命令行參數。 "terminal.integrated.shellArgs.osx": ["-l"], // 終端在 Windows 上使用的 shell 的路徑。使用隨 Windows 一塊兒提供的 shell 時(cmd、PowerShell 或 Ubuntu 上的 Bash),相對 C:\Windows\System32,首選 C:\Windows\sysnative 以使用 64 位版本。 "terminal.integrated.shell.windows": "C:\\windows\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe", // 在 Windows 終端上時使用的命令行參數。 "terminal.integrated.shellArgs.windows": [], // 設置後,在終端內右鍵單擊時,這將阻止顯示上下文菜單,相反,它將在有選項時進行復制,而且在沒有選項時進行粘貼。 "terminal.integrated.rightClickCopyPaste": true, // 控制終端的字體系列,這在編輯器中是默認的。fontFamily 的值。 "terminal.integrated.fontFamily": "", // 控制是否在終端中啓用字體連字。 "terminal.integrated.fontLigatures": false, // 控制終端的字號(以像素爲單位)。 "terminal.integrated.fontSize": 14, // 控制終端的行高,此數字乘以終端字號獲得實際行高(以像素表示)。 "terminal.integrated.lineHeight": 1.2, // 是否在終端內啓用粗體文本,這須要終端 shell 的支持。 "terminal.integrated.enableBold": true, // 控制終端遊標是否閃爍。 "terminal.integrated.cursorBlinking": false, // 控制終端遊標的樣式。 "terminal.integrated.cursorStyle": "block", // 控制終端保持在緩衝區的最大行數。 "terminal.integrated.scrollback": 1000, // 控制是否在終端啓動時設置區域設置變量,在 OS X 上默認設置爲 true,在其餘平臺上爲 false。 "terminal.integrated.setLocaleVariables": false, // 將在其中啓動終端的一個顯式起始路徑,它用做 shell 進程的當前工做目錄(cwd)。當根目錄爲不方便的 cwd 時,此路徑在工做區設置中可能十分有用。 "terminal.integrated.cwd": "", // 在存在活動終端會話的狀況下,退出時是否要確認。 "terminal.integrated.confirmOnExit": false, // 一組命令 ID,其鍵綁定不發送到 shell 而始終由 Code 處理。這使得一般由 shell 使用的鍵綁定的使用效果與未將終端設爲焦點時相同,例如按 Ctrl+P 啓動 Quick Open。 "terminal.integrated.commandsToSkipShell": [ "editor.action.toggleTabFocusMode", "workbench.action.debug.continue", "workbench.action.debug.pause", "workbench.action.debug.restart", "workbench.action.debug.run", "workbench.action.debug.start", "workbench.action.debug.stop", "workbench.action.focusActiveEditorGroup", "workbench.action.focusFirstEditorGroup", "workbench.action.focusSecondEditorGroup", "workbench.action.focusThirdEditorGroup", "workbench.action.openNextRecentlyUsedEditorInGroup", "workbench.action.openPreviousRecentlyUsedEditorInGroup", "workbench.action.quickOpen", "workbench.action.showCommands", "workbench.action.terminal.clear", "workbench.action.terminal.copySelection", "workbench.action.terminal.focus", "workbench.action.terminal.focusAtIndex1", "workbench.action.terminal.focusAtIndex2", "workbench.action.terminal.focusAtIndex3", "workbench.action.terminal.focusAtIndex4", "workbench.action.terminal.focusAtIndex5", "workbench.action.terminal.focusAtIndex6", "workbench.action.terminal.focusAtIndex7", "workbench.action.terminal.focusAtIndex8", "workbench.action.terminal.focusAtIndex9", "workbench.action.terminal.focusNext", "workbench.action.terminal.focusPrevious", "workbench.action.terminal.kill", "workbench.action.terminal.new", "workbench.action.terminal.paste", "workbench.action.terminal.runActiveFile", "workbench.action.terminal.runSelectedText", "workbench.action.terminal.scrollDown", "workbench.action.terminal.scrollDownPage", "workbench.action.terminal.scrollToBottom", "workbench.action.terminal.scrollToTop", "workbench.action.terminal.scrollUp", "workbench.action.terminal.scrollUpPage", "workbench.action.terminal.toggleTerminal" ], // 自定義要在 Windows 上運行的終端。 "terminal.external.windowsExec": "%COMSPEC%", // 自定義要在 OS X 上運行的終端應用程序。 "terminal.external.osxExec": "Terminal.app", // 自定義要在 Linux 上運行的終端。 "terminal.external.linuxExec": "xterm", // 控制問題預覽是否應在打開文件時自動顯示它們。 "problems.autoReveal": true, // 啓用要發送給 Microsoft 的使用狀況數據和錯誤。 "telemetry.enableTelemetry": true, // 啓用要發送給 Microsoft 的故障報表。 // 此選項需重啓纔可生效。 "telemetry.enableCrashReporter": true, // Should display the project name in the Status Bar? "projectManager.showProjectNameInStatusBar": true, // Should the project be opened using a New Window when you click the Status Bar? "projectManager.openInNewWindowWhenClickingInStatusBar": false, // List the projects sorted by...(Saved, Name, Path or Recent) "projectManager.sortList": "Name", // List the projects grouped by...(Favorites, VSCode, Git and SVN) "projectManager.groupList": false, // Indicates an alternative location where the `projects.json` file is stored "projectManager.projectsLocation": "", // Indicates the base folders to search for VSCode projects "projectManager.vscode.baseFolders": [], // Indicates folders to be ignored, like "node_modules", "out", "typings", "test" "projectManager.vscode.ignoredFolders": [ "node_modules", "out", "typings", "test" ], // Indicates the maximum depth of folder recursion to search for projects. Any value below 1 means there is no limit "projectManager.vscode.maxDepthRecursion": 4, // Indicates the base folders to search for Git projects "projectManager.git.baseFolders": [], // Indicates folders to be ignored, like "node_modules", "out", "typings", "test" "projectManager.git.ignoredFolders": [ "node_modules", "out", "typings", "test" ], // Indicates the maximum depth of folder recursion to search for projects. Any value below 1 means there is no limit "projectManager.git.maxDepthRecursion": 4, // Indicates the base folders to search for SVN projects "projectManager.svn.baseFolders": [], // Indicates folders to be ignored, like "node_modules", "out", "typings", "test" "projectManager.svn.ignoredFolders": [ "node_modules", "out", "typings", "test" ], // Indicates the maximum depth of folder recursion to search for projects. Any value below 1 means there is no limit "projectManager.svn.maxDepthRecursion": 4, // Should cache the VSCode, Git and SVN projects found? "projectManager.cacheProjectsBetweenSessions": true, // Should check for invalid paths before listing, showing a message below the project name? "projectManager.checkInvalidPathsBeforeListing": true, // By default, create file username "fileheader.Author": "zhangfan", // By default, common template. Do not modify it!!!!! "fileheader.tpl": "/*\r\n * @Author: {author}\r\n * @Date: {createTime}\r\n * @Last Modified by: {lastModifiedBy}\r\n * @Last Modified time: {updateTime}\r\n */\r\n", // By default, update file username. "fileheader.LastModifiedBy": "zhangfan", // 針對 [go] 語言,配置替代編輯器設置。 "[go]": { "editor.insertSpaces": false }, // 針對 [json] 語言,配置替代編輯器設置。 "[json]": { "editor.quickSuggestions": { "strings": true } }, // 針對 [makefile] 語言,配置替代編輯器設置。 "[makefile]": { "editor.insertSpaces": false }, // 針對 [markdown] 語言,配置替代編輯器設置。 "[markdown]": { "editor.wordWrap": "on", "editor.quickSuggestions": false }, // 針對 [yaml] 語言,配置替代編輯器設置。 "[yaml]": { "editor.insertSpaces": true, "editor.tabSize": 2 }, // Control whether htmlhint is enabled for HTML files or not. "htmlhint.enable": true, // The htmlhint options object to provide args to the htmlhint command. "htmlhint.options": {}, // 控制自動檢測 Gulp 任務是否打開。默認開啓。 "gulp.autoDetect": "on", // Defaults to true, using IEC's representation. Set to false to get SI representation. "filesize.useKibibyteRepresentation": true, // Defaults to true, using 24-hour format. Set to false to get 12-hour format. "filesize.use24HourFormat": true, // List of paths to ignore when using VS Code format command, including format on save. Uses glob pattern matching. "beautify.ignore": [], // A path to file or object containing the configuration options for js-beautify. If the .jsbeautifyrc file exists in project root, it overrides this configuration. "beautify.config": null, // Link file types to the beautifier type "beautify.language": { "js": { "type": ["javascript", "json"], "filename": [".jshintrc", ".jsbeautify"] }, "css": ["css", "scss"], "html": ["htm", "html"] }, // 是否已啓用 GIT "git.enabled": true, // 可執行 GIT 的路徑 "git.path": null, // 是否已啓用自動刷新 "git.autorefresh": true, // 是否啓用了自動提取 "git.autofetch": true, // 同步 GIT 存儲庫前請先進行確認 "git.confirmSync": true, // 控制 Git 徽章計數器。「all」計算全部更改。「tracked」只計算跟蹤的更改。「off」關閉此功能。 "git.countBadge": "all", // 控制運行「簽出到...」時列出的分支的類型。「all」顯示全部 refs,「local」只顯示本地分支,「tags」只顯示標籤,「remote」只顯示遠程分支。 "git.checkoutType": "all", // 忽略舊版 Git 警告 "git.ignoreLegacyWarning": false, // 忽略「存儲庫中存在大量更改」的警告 "git.ignoreLimitWarning": false, // 若是設置成 true,關於新的版本消息將再也不顯示 "vsicons.dontShowNewVersionMessage": false, // 若是設置成 true,檢測工程文件後自動重啓插件 "vsicons.projectDetection.autoReload": false, // 若是設置成 true,插件再也不自動檢測工程文件 "vsicons.projectDetection.disableDetect": false, // 若是設置成 true,插件會自動匹配 Angular 模式 "vsicons.presets.angular": false, // 若是設置成 true,插件會自動使用官方 JS 圖標 "vsicons.presets.jsOfficial": false, // 若是設置成 true,插件會自動使用官方 TS 圖標 "vsicons.presets.tsOfficial": false, // 若是設置成 true,插件會自動使用官方 JSON 圖標 "vsicons.presets.jsonOfficial": false, // 若是設置成 true,全部文件夾會隱藏 "vsicons.presets.hideFolders": false, // configuration.presets.foldersAllDefaultIcon.description "vsicons.presets.foldersAllDefaultIcon": false, // 這些自定義設置會覆蓋掉系統默認的文件圖標設置 "vsicons.associations.files": [], // 這些自定義設置會覆蓋掉系統默認的文件夾圖標設置 "vsicons.associations.folders": [], // 這個設置會改變默認的深色文件圖標 "vsicons.associations.fileDefault.file": null, // 這個設置會改變默認的淺色文件圖標 "vsicons.associations.fileDefault.file_light": null, // 這個設置會改變默認的深色文件夾圖標 "vsicons.associations.folderDefault.folder": null, // 這個設置會改變默認的淺色文件夾圖標 "vsicons.associations.folderDefault.folder_light": null, // Changes systems default explorer to a specific one. Based on https://github.com/pwnall/node-open "view-in-browser.customBrowser": "", // Validate css/scss/less/postcss "vetur.validation.style": true, // Validate js/ts "vetur.validation.script": true, // Whether to have initial indent for <style> section "vetur.format.styleInitialIndent": false, // Whether to have initial indent for <script> section "vetur.format.scriptInitialIndent": false, // "vetur.format.html.max_preserve_newlines": 1, // "vetur.format.html.preserve_newlines": true, // "vetur.format.html.wrap_line_length": 0, // "vetur.format.html.wrap_attributes": "auto", // Add a new line after every css rule "vetur.format.css.newline_between_rules": true, // Whether existing line breaks before elements should be preserved (only works before elements, not inside tags or for text) "vetur.format.css.preserve_newlines": true, // Add a space before function parenthesis "vetur.format.js.InsertSpaceBeforeFunctionParenthesis": false, "vetur.format.defaultFormatterOptions": { "js-beautify-html": { "wrap_attributes": "force-aligned" }, "prettyhtml": { "printWidth": 100, "singleQuote": false } }, // Configuration options for Easy LESS extension. "less.compile": {}, // Adds the file extension to a import statements "path-intellisense.extensionOnImport": false, // Mappings for paths "path-intellisense.mappings": {}, // Show hidden files "path-intellisense.showHiddenFiles": false, // Automatically adds slash after directory "path-intellisense.autoSlashAfterDirectory": false, // Sets an absolute path to the current workspace "path-intellisense.absolutePathToWorkspace": true, // When set to true, the extension looks for .scss file relative to the currently opened html file with the same name. "htmlScss.isAngularProject": true, // Set paths to .scss files. Imports are automatically handled. When no paths are set, all .scss files in the workspace will be included. "htmlScss.globalStyles": null, // 控制自動檢測 Grunt 任務是否打開。默認開啓。 "grunt.autoDetect": "on", // Set the languages that the extension will be activated. e.g. ["html","xml","php"] By default, it is ["*"] and will be activated for all languages. "auto-rename-tag.activationOnLanguage": ["*"], "eslint.autoFixOnSave": true, "prettier.singleQuote": true, "prettier.semi": false, "prettier.eslintIntegration": true, "docthis.authorName": "zhangFan", "docthis.includeAuthorTag": true, "docthis.includeDateTag": true, "docthis.includeDescriptionTag": false, "git.enableSmartCommit": true, "javascript.updateImportsOnFileMove.enabled": "always", "explorer.confirmDelete": false, "explorer.confirmDragAndDrop": false, "search.followSymlinks": false, "vetur.format.defaultFormatter.html": "js-beautify-html", "vetur.format.defaultFormatter.js": "vscode-typescript", "vetur.validation.template": false, "javascript.format.insertSpaceBeforeFunctionParenthesis": false, "files.associations": { "*.vue": "vue" }, "eslint.validate": [ "javascript", "javascriptreact", { "language": "vue", "autoFix": true } ], "editor.formatOnSave": true, "eslint.autoFixOnSave": true }