Skip to content

Commit 3ba8af6

Browse files
committed
Translate ESLint rule index page
1 parent 37a7f80 commit 3ba8af6

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

  • src/content/reference/eslint-plugin-react-hooks

‎src/content/reference/eslint-plugin-react-hooks/index.md‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,36 @@ version: rc
55

66
<Intro>
77

8-
`eslint-plugin-react-hooks` provides ESLint rules to enforce the [Rules of React](/reference/rules).
8+
`eslint-plugin-react-hooks` は、[React のルール](/reference/rules)を強制するための ESLint ルールを提供します。
99

1010
</Intro>
1111

12-
This plugin helps you catch violations of React's rules at build time, ensuring your components and hooks follow React's rules for correctness and performance. The lints cover both fundamental React patterns (exhaustive-deps and rules-of-hooks) and issues flagged by React Compiler. React Compiler diagnostics are automatically surfaced by this ESLint plugin, and can be used even if your app hasn't adopted the compiler yet.
12+
このプラグインは React のルール違反をビルド時に検出し、コンポーネントやフックがコードの正しさとパフォーマンスを保つための React のルールに従っているか確認するのに役立ちます。lint ルールは、React の基本的なパターン(exhaustive-deps と rules-of-hooks)と、React Compiler が検出する問題の両方を対象とします。React Compiler の診断情報はこの ESLint プラグインによって自動的に表示されるため、アプリにコンパイラをまだ導入していない場合でも利用できます。
1313

1414
<Note>
15-
When the compiler reports a diagnostic, it means that the compiler was able to statically detect a pattern that is not supported or breaks the Rules of React. When it detects this, it **automatically** skips over those components and hooks, while keeping the rest of your app compiled. This ensures optimal coverage of safe optimizations that won't break your app.
15+
コンパイラが診断情報を報告するのは、サポートされていないパターンや React のルールに違反するパターンを静的に検出できた場合です。このようなパターンを検出すると、アプリの残りの部分はコンパイルしたまま、該当するコンポーネントやフックを**自動的に**スキップします。これにより、アプリを壊さない安全な最適化を最大限に適用できます。
1616

17-
What this means for linting, is that you don’t need to fix all violations immediately. Address them at your own pace to gradually increase the number of optimized components.
17+
つまり lint に関しては、すべての違反をすぐに修正する必要はありません。自分のペースで対処することで、最適化されるコンポーネントの数を徐々に増やすことができます。
1818
</Note>
1919

20-
## Recommended Rules {/*recommended*/}
21-
22-
These rules are included in the `recommended` preset in `eslint-plugin-react-hooks`:
23-
24-
* [`exhaustive-deps`](/reference/eslint-plugin-react-hooks/lints/exhaustive-deps) - Validates that dependency arrays for React hooks contain all necessary dependencies
25-
* [`rules-of-hooks`](/reference/eslint-plugin-react-hooks/lints/rules-of-hooks) - Validates that components and hooks follow the Rules of Hooks
26-
* [`component-hook-factories`](/reference/eslint-plugin-react-hooks/lints/component-hook-factories) - Validates higher order functions defining nested components or hooks
27-
* [`config`](/reference/eslint-plugin-react-hooks/lints/config) - Validates the compiler configuration options
28-
* [`error-boundaries`](/reference/eslint-plugin-react-hooks/lints/error-boundaries) - Validates usage of Error Boundaries instead of try/catch for child errors
29-
* [`gating`](/reference/eslint-plugin-react-hooks/lints/gating) - Validates configuration of gating mode
30-
* [`globals`](/reference/eslint-plugin-react-hooks/lints/globals) - Validates against assignment/mutation of globals during render
31-
* [`immutability`](/reference/eslint-plugin-react-hooks/lints/immutability) - Validates against mutating props, state, and other immutable values
32-
* [`incompatible-library`](/reference/eslint-plugin-react-hooks/lints/incompatible-library) - Validates against usage of libraries which are incompatible with memoization
33-
* [`preserve-manual-memoization`](/reference/eslint-plugin-react-hooks/lints/preserve-manual-memoization) - Validates that existing manual memoization is preserved by the compiler
34-
* [`purity`](/reference/eslint-plugin-react-hooks/lints/purity) - Validates that components/hooks are pure by checking known-impure functions
35-
* [`refs`](/reference/eslint-plugin-react-hooks/lints/refs) - Validates correct usage of refs, not reading/writing during render
36-
* [`set-state-in-effect`](/reference/eslint-plugin-react-hooks/lints/set-state-in-effect) - Validates against calling setState synchronously in an effect
37-
* [`set-state-in-render`](/reference/eslint-plugin-react-hooks/lints/set-state-in-render) - Validates against setting state during render
38-
* [`static-components`](/reference/eslint-plugin-react-hooks/lints/static-components) - Validates that components are static, not recreated every render
39-
* [`unsupported-syntax`](/reference/eslint-plugin-react-hooks/lints/unsupported-syntax) - Validates against syntax that React Compiler does not support
40-
* [`use-memo`](/reference/eslint-plugin-react-hooks/lints/use-memo) - Validates usage of the `useMemo` hook without a return value
20+
## 推奨ルール {/*recommended*/}
21+
22+
以下のルールが `eslint-plugin-react-hooks` の `recommended` プリセットに含まれています。
23+
24+
* [`exhaustive-deps`](/reference/eslint-plugin-react-hooks/lints/exhaustive-deps) - React フックの依存配列に必要な依存値がすべて含まれているか検証
25+
* [`rules-of-hooks`](/reference/eslint-plugin-react-hooks/lints/rules-of-hooks) - コンポーネントとフックがフックのルールに従っているか検証
26+
* [`component-hook-factories`](/reference/eslint-plugin-react-hooks/lints/component-hook-factories) - コンポーネントやフックを内部で定義する高階関数がないか検証
27+
* [`config`](/reference/eslint-plugin-react-hooks/lints/config) - コンパイラの設定オプションを検証
28+
* [`error-boundaries`](/reference/eslint-plugin-react-hooks/lints/error-boundaries) - 子コンポーネントのエラーを、エラーバウンダリではなく try/catch で処理しようとしていないか検証
29+
* [`gating`](/reference/eslint-plugin-react-hooks/lints/gating) - ゲーティングモードの設定を検証
30+
* [`globals`](/reference/eslint-plugin-react-hooks/lints/globals) - レンダー中にグローバル変数への代入やミューテーションを行っていないか検証
31+
* [`immutability`](/reference/eslint-plugin-react-hooks/lints/immutability) - props、state、およびその他のイミュータブルな値をミューテーションしていないか検証
32+
* [`incompatible-library`](/reference/eslint-plugin-react-hooks/lints/incompatible-library) - メモ化と互換性のないライブラリを使用していないか検証
33+
* [`preserve-manual-memoization`](/reference/eslint-plugin-react-hooks/lints/preserve-manual-memoization) - 既存の手動メモ化がコンパイラによって保持されるか検証
34+
* [`purity`](/reference/eslint-plugin-react-hooks/lints/purity) - 既知の純関数でない関数をチェックし、コンポーネントやフックが純粋であるか検証
35+
* [`refs`](/reference/eslint-plugin-react-hooks/lints/refs) - ref が正しく使用され、レンダー中に読み書きされていないか検証
36+
* [`set-state-in-effect`](/reference/eslint-plugin-react-hooks/lints/set-state-in-effect) - エフェクト内で setState を同期的に呼び出していないか検証
37+
* [`set-state-in-render`](/reference/eslint-plugin-react-hooks/lints/set-state-in-render) - レンダー中に state をセットしていないか検証
38+
* [`static-components`](/reference/eslint-plugin-react-hooks/lints/static-components) - コンポーネントが静的に作成され、レンダーのたびに再作成されていないか検証
39+
* [`unsupported-syntax`](/reference/eslint-plugin-react-hooks/lints/unsupported-syntax) - React Compiler がサポートしていない構文を使用していないか検証
40+
* [`use-memo`](/reference/eslint-plugin-react-hooks/lints/use-memo) - 返り値のない `useMemo` フックの使用がないか検証

0 commit comments

Comments
 (0)