Home / File/ index.ts — react Source File

index.ts — react Source File

Architecture documentation for index.ts, a typescript file in the react codebase. 5 imports, 1 dependents.

File typescript BabelCompiler Validation 5 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  09f2574e_a7bc_f280_9531_89cfe9b31a61["index.ts"]
  cc8eb92a_b0c5_c461_8a5e_7435585bbc6e["ReactCompilerRule.ts"]
  09f2574e_a7bc_f280_9531_89cfe9b31a61 --> cc8eb92a_b0c5_c461_8a5e_7435585bbc6e
  c2fb1111_dc32_da0a_d43a_b38b8d13f4e9["allRules"]
  09f2574e_a7bc_f280_9531_89cfe9b31a61 --> c2fb1111_dc32_da0a_d43a_b38b8d13f4e9
  86f7dc54_69da_eb35_daf6_78a5a3c9b486["mapErrorSeverityToESlint"]
  09f2574e_a7bc_f280_9531_89cfe9b31a61 --> 86f7dc54_69da_eb35_daf6_78a5a3c9b486
  30ba4ebf_f43f_6cd4_4e5f_9d4207260224["recommendedRules"]
  09f2574e_a7bc_f280_9531_89cfe9b31a61 --> 30ba4ebf_f43f_6cd4_4e5f_9d4207260224
  e023ae51_0bf7_c8b1_0545_8e7304e4bb72["eslint"]
  09f2574e_a7bc_f280_9531_89cfe9b31a61 --> e023ae51_0bf7_c8b1_0545_8e7304e4bb72
  799656f0_feaf_2c82_77fc_4a08283ea146["shared-utils.ts"]
  799656f0_feaf_2c82_77fc_4a08283ea146 --> 09f2574e_a7bc_f280_9531_89cfe9b31a61
  style 09f2574e_a7bc_f280_9531_89cfe9b31a61 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 {type Linter} from 'eslint';
import {
  allRules,
  mapErrorSeverityToESlint,
  recommendedRules,
} from './rules/ReactCompilerRule';

const meta = {
  name: 'eslint-plugin-react-compiler',
};

const configs = {
  recommended: {
    plugins: {
      'react-compiler': {
        rules: allRules,
      },
    },
    rules: Object.fromEntries(
      Object.entries(recommendedRules).map(([name, ruleConfig]) => {
        return [
          'react-compiler/' + name,
          mapErrorSeverityToESlint(ruleConfig.severity),
        ];
      }),
    ) as Record<string, Linter.StringSeverity>,
  },
};

const rules = Object.fromEntries(
  Object.entries(allRules).map(([name, {rule}]) => [name, rule]),
);

export {configs, rules, meta};

Domain

Subdomains

Functions

Frequently Asked Questions

What does index.ts do?
index.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 index.ts?
index.ts defines 1 function(s): rules.
What does index.ts depend on?
index.ts imports 5 module(s): ReactCompilerRule.ts, allRules, eslint, mapErrorSeverityToESlint, recommendedRules.
What files import index.ts?
index.ts is imported by 1 file(s): shared-utils.ts.
Where is index.ts in the architecture?
index.ts is located at compiler/packages/eslint-plugin-react-compiler/src/index.ts (domain: BabelCompiler, subdomain: Validation, directory: compiler/packages/eslint-plugin-react-compiler/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free