Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

ESLint import-x/order config doesn't match documented import organization

未關閉 適合新手
#9,225 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

@Devehab 已經在處理了。

開始於 2026年10月27日。

  • #9238 來自 @Devehab —— 未關閉

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
85/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
eslint, typescript

研究方向

閱讀 docs/code-style.md 中關於 import 組織的部分,並將其中的排序與 eslint.config.js 中的規則進行比較,尤其留意型別群組的位置。更新文件以說明設定所強制的順序,接著檢查該部分是否與列出的群組一致。完成的標準是:讀者能依照文件所述的順序操作,且不會與 ESLint 相矛盾。

由索引模型根據 Issue 內容生成。

描述

Enter your suggestions in details:

The import ordering documented in docs/code-style.md#import-organization doesn't match ESLint import-x/order rules.

Import Organization

Organize imports in this order:

  1. Node.js built-in modules
  2. External library imports (Including @node-core/*)
  3. Relative imports (./*, ../*, #specifier/)
  4. Type-only imports at the end of each given section

Actual ESLint config:

groups: [
  'builtin',
  'external',
  'internal',
  'object',
  'type',            // <-- all type imports in one block
  ['sibling', 'parent'],
  'index',
],

Leads to:
https://github.com/nodejs/nodejs.org/blob/72c17389079e752245a45ff01786c2bb0ae12f0f/apps/site/components/EOL/VulnerabilityChips/VulnerabilityChip/index.tsx#L1-L8

Proposal: Update docs to match ESLint config.

主要語言
TypeScript
星號
6.9k
分支
6.5k
平均合併
2 天 1 小時
30 天內合併 PR
48

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

nodejs/nodejs.org 的其他 Issue

查看 nodejs/nodejs.org 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。