Add oxlint linting
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
Start with src/useEditable.ts at the lines the issue cites (about 284, 325 and 519) and with the check and format scripts in package.json, which the new lint step has to join. Add a .oxlintrc.json modelled on react-live's, and decide which findings to suppress or disable. Done means npm run check runs oxlint and passes, the two cheap fixes are in, and the hooks-order change has been checked by hand in a browser since there are no tests.
索引モデルが issue の本文から書いたものです。
説明
Add oxlint linting, following react-live's setup (.oxlintrc.json, check:lint in npm run check, oxlint --fix in npm run format).
Findings
Running react-live's .oxlintrc.json against src/useEditable.ts gives about 17 findings:
Real issues, cheap to fix
- Hooks after an early return (
src/useEditable.ts:284):if (typeof navigator !== 'object') return edit;runs before twouseLayoutEffectcalls. Harmless in practice (the condition is fixed per environment) but violates the rules of hooks. Move the guard into the effects, or drop it, since layout effects don't run on the server anyway. - Unused catch binding (
:325):catch (_error)→catch {}.
Real smell, but fixing it changes behavior
[elementRef.current!, …]deps (:519): reads a ref during render, and the hook relies on that to reattach when the element changes. A proper fix needs a callback ref or an API change. Suggest suppressing inline with an explanatory comment.
React Compiler-style rules (immutability, refs, about 8 findings)
- These conflict with the hook's design: a mutable
stateobject fromuseState(() => …)that is never set, only mutated from effects and handlers. Suggest turning these rules off for this repo.
Noise / intentional
exhaustive-deps/memo-dependencies: the dependency arrays are deliberately partial.no-shadow(state),no-underscore-dangle(_trackStateTimestamp).
Proposal
- Add
oxlint+.oxlintrc.jsonbased on react-live's, with the compiler-style rules off - Fix the two cheap issues
- Suppress
:519inline with a comment - Leave the noise as warnings
- Wire
check:lintintocheckandoxlint --fixintoformat
Since there are no tests yet, verify the hooks-order change by hand in a browser.
- 主要言語
- TypeScript
- スター
- 620
- フォーク
- 16
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FormidableLabs/use-editable のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
FormidableLabs/use-editable#36 · コメント 1 件 · リアクション 1 件 ·
-
Identifier "b" has already been declared対応中かも @haneetsingh が 636 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
FormidableLabs/use-editable#30 · コメント 3 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
FormidableLabs/use-editable の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
chaitin/MonkeyCode#1437 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
carbon-design-system/carbon-ai-chat#2615 ·
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
redhat-developer/rhdh-plugin-export-overlays#4486 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offline対応中かも @r2jaff が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ComposioHQ/composio#5054 ·
メンテナーはふだん 1 日以内に返信