規則
所有規則實作的進度追蹤在此。
- 規則總數:441
- 預設啟用的規則:97
正確性 (172):
完全錯誤或無用的程式碼。
效能 (6):
可以寫得更快執行的程式碼。
規則名稱 | 來源 | 預設 | 可修正? |
---|---|---|---|
no-await-in-loop | eslint | ||
no-accumulating-spread | oxc | ||
jsx-no-jsx-as-prop | react_perf | ||
jsx-no-new-array-as-prop | react_perf | ||
jsx-no-new-function-as-prop | react_perf | ||
jsx-no-new-object-as-prop | react_perf |
限制 (57):
防止使用語言和程式庫功能的檢查。不得整體啟用,應在啟用前逐案考慮。
可疑 (21):
極有可能錯誤或無用的程式碼。
規則名稱 | 來源 | 預設 | 可修正? |
---|---|---|---|
no-extend-native | eslint | ||
no-new | eslint | ||
no-unexpected-multiline | eslint | ⚠️🛠️️ | |
no-useless-concat | eslint | ||
no-useless-constructor | eslint | 🛠️ | |
no-duplicates | import | ||
no-named-as-default | import | ||
no-named-as-default-member | import | ||
no-self-import | import | ||
no-commented-out-tests | jest | ||
approx-constant | oxc | ||
misrefactored-assign-op | oxc | 🚧 | |
no-async-endpoint-handlers | oxc | ||
iframe-missing-sandbox | react | 🚧 | |
jsx-no-comment-textnodes | react | ||
react-in-jsx-scope | react | ||
no-confusing-non-null-assertion | typescript | 🚧 | |
no-extraneous-class | typescript | ||
no-unnecessary-type-constraint | typescript | ||
consistent-function-scoping | unicorn | 🚧 | |
prefer-add-event-listener | unicorn | 🚧 |
迂腐 (72):
相當嚴格或偶爾有誤判的檢查。
樣式 (103):
應該以更慣用的方式編寫的程式碼。
培育中 (10):
仍在開發中的新 Lint 規則。
規則名稱 | 來源 | 預設 | 可修正? |
---|---|---|---|
constructor-super | eslint | ||
getter-return | eslint | ||
no-undef | eslint | ||
no-unreachable | eslint | ||
export | import | ||
no-return-in-finally | promise | ||
require-render-return | react | ||
rules-of-hooks | react | ||
no-side-effects-in-initialization | tree_shaking | ||
consistent-type-imports | typescript | 🛠️ |