build-eslint-docs.js — react Source File
Architecture documentation for build-eslint-docs.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
const ReactCompiler = require('../packages/babel-plugin-react-compiler/dist');
const combinedRules = [
{
name: 'rules-of-hooks',
recommended: true,
description:
'Validates that components and hooks follow the [Rules of Hooks](https://react.dev/reference/rules/rules-of-hooks)',
},
{
name: 'exhaustive-deps',
recommended: true,
description:
'Validates that hooks which accept dependency arrays (`useMemo()`, `useCallback()`, `useEffect()`, etc) ' +
'list all referenced variables in their dependency array. Referencing a value without including it in the ' +
'dependency array can lead to stale UI or callbacks.',
},
...ReactCompiler.LintRules,
];
const printed = combinedRules
.filter(
ruleConfig => ruleConfig.rule.recommended && ruleConfig.severity !== 'Off'
)
.map(ruleConfig => {
return `
## \`react-hooks/${ruleConfig.rule.name}\`
${ruleConfig.rule.description}
`.trim();
})
.join('\n\n');
console.log(printed);
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does build-eslint-docs.js do?
build-eslint-docs.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in build-eslint-docs.js?
build-eslint-docs.js defines 1 function(s): printed.
Where is build-eslint-docs.js in the architecture?
build-eslint-docs.js is located at compiler/scripts/build-eslint-docs.js (domain: BabelCompiler, subdomain: Entrypoint, directory: compiler/scripts).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free