Utils.ts — react Source File
Architecture documentation for Utils.ts, a typescript file in the react codebase. 1 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 09c0f942_dfde_7720_a179_0571ede43aad["Utils.ts"] e023ae51_0bf7_c8b1_0545_8e7304e4bb72["eslint"] 09c0f942_dfde_7720_a179_0571ede43aad --> e023ae51_0bf7_c8b1_0545_8e7304e4bb72 ea02b01a_dd46_4b35_fe00_775aec496668["ExhaustiveDeps.ts"] ea02b01a_dd46_4b35_fe00_775aec496668 --> 09c0f942_dfde_7720_a179_0571ede43aad 47fb9f02_49dd_1d0d_5027_9353a6a77f1e["RulesOfHooks.ts"] 47fb9f02_49dd_1d0d_5027_9353a6a77f1e --> 09c0f942_dfde_7720_a179_0571ede43aad style 09c0f942_dfde_7720_a179_0571ede43aad fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Rule } from 'eslint';
const SETTINGS_KEY = 'react-hooks';
const SETTINGS_ADDITIONAL_EFFECT_HOOKS_KEY = 'additionalEffectHooks';
export function getAdditionalEffectHooksFromSettings(
settings: Rule.RuleContext['settings'],
): RegExp | undefined {
const additionalHooks = settings[SETTINGS_KEY]?.[SETTINGS_ADDITIONAL_EFFECT_HOOKS_KEY];
if (additionalHooks != null && typeof additionalHooks === 'string') {
return new RegExp(additionalHooks);
}
return undefined;
}
Domain
Subdomains
Functions
Dependencies
- eslint
Imported By
Source
Frequently Asked Questions
What does Utils.ts do?
Utils.ts is a source file in the react codebase, written in typescript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in Utils.ts?
Utils.ts defines 1 function(s): getAdditionalEffectHooksFromSettings.
What does Utils.ts depend on?
Utils.ts imports 1 module(s): eslint.
What files import Utils.ts?
Utils.ts is imported by 2 file(s): ExhaustiveDeps.ts, RulesOfHooks.ts.
Where is Utils.ts in the architecture?
Utils.ts is located at packages/eslint-plugin-react-hooks/src/shared/Utils.ts (domain: BabelCompiler, subdomain: Validation, directory: packages/eslint-plugin-react-hooks/src/shared).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free