⬅️ Back to Table of Contents
📄 BaseRuleReference.tsx
📊 Analysis Summary
Metric |
Count |
🔧 Functions |
1 |
📦 Imports |
1 |
📊 Variables & Constants |
1 |
💠 JSX Elements |
2 |
📐 Interfaces |
1 |
📚 Table of Contents
🛠️ File Location:
📂 packages/website/src/theme/MDXComponents/BaseRuleReference.tsx
📦 Imports
Variables & Constants
Name |
Type |
Kind |
Value |
Exported |
href |
string |
const |
https://github.com/eslint/eslint/blob/main/docs/src/rules/${baseRule}.md |
✗ |
JSX Elements
Component |
Type |
Props |
Children |
sup |
element |
none |
text: "Taken with ❤️ from", , text: "." |
a |
element |
href={href} |
text: "ESLint core" |
Functions
`BaseRuleReference({
baseRule,
}: BaseRuleReferenceProps): React.ReactNode`
Code
export function BaseRuleReference({
baseRule,
}: BaseRuleReferenceProps): React.ReactNode {
const href = `https://github.com/eslint/eslint/blob/main/docs/src/rules/${baseRule}.md`;
return (
<sup>
Taken with ❤️ from <a href={href}>ESLint core</a>.
</sup>
);
}
- Parameters:
{
baseRule,
}: BaseRuleReferenceProps
- Return Type:
React.ReactNode
Interfaces
BaseRuleReferenceProps
Interface Code
export interface BaseRuleReferenceProps {
baseRule: string;
}
Properties
Name |
Type |
Optional |
Description |
baseRule |
string |
✗ |
|