選項對話方塊:文字編輯器 > JavaScript/TypeScript > LintingOptions dialog box: Text Editor > JavaScript/TypeScript > Linting

使用 [選項]**** 對話方塊的 [Linting]**** 頁面,設定在程式碼編輯器中分析程式碼的選項。Use the Linting page of the Options dialog box to set options for analyzing code in the Code Editor. 若要存取此頁面,請在功能表列上選擇 [工具 > 選項],然後展開 [文字編輯器 > JavaScript/TypeScript > Linting]。To access this page, on the menu bar, choose Tools > Options, and then expand Text Editor > JavaScript/TypeScript > Linting.

ESLint 設定ESLint Settings

這些選項可讓您啟用靜態 JavaScript 與 TypeSCript 程式碼分析,並選擇要分析的檔案。These options let you enable static JavaScript and TypeSCript code analysis, and choose which files are analyzed. 如需 ESLint 的詳細資訊,請參閱 ESLint.orgFor more information about ESLint, see ESLint.org.

UIElement 清單UIElement list

選項Option 描述Description
啟用 ESLintEnable ESLint 選取此選項時,程式碼編輯器可讓您對程式碼進行靜態分析。When this option is selected, the Code Editor allows for static analysis on the code.
列出專案中的所有內含檔案,即使是關閉的檔案也列出Lint all files included in project, even closed files 選取此選項時,將分析已關閉的檔案,除非僅針對開啟的檔案報告診斷。When this option is selected, closed files are analyzed, unless diagnostics are only reported for open files.

全域 ESLint 組態選項Global ESLint Config Options

此選項可讓您複製全域 ESLint 組態檔的位置。This option lets you copy the location of the global ESLint configuration file. 此外,如果您之前變更位置,則可以將檔案重設為其預設位置。Also, if you previously changed the location, you can reset the file to its default location.

另請參閱See also