File tree Expand file tree Collapse file tree 13 files changed +203
-83
lines changed
Expand file tree Collapse file tree 13 files changed +203
-83
lines changed Original file line number Diff line number Diff line change 111111 },
112112 "pnpm" : {
113113 "overrides" : {
114- "is-core-module" : " npm:@nolyfill/is-core-module@^1.0.39" ,
115- "safe-buffer" : " npm:@nolyfill/safe-buffer@^1.0.41" ,
116- "safer-buffer" : " npm:@nolyfill/safer-buffer@^1.0.41" ,
117- "typedarray" : " npm:@nolyfill/typedarray@^1.0.29" ,
118114 "@types/react" : " ^19.0.8" ,
119115 "@types/react-dom" : " ^19.0.3" ,
120116 "cross-spawn" : " ^7.0.6" ,
117+ "is-core-module" : " npm:@nolyfill/is-core-module@^1.0.39" ,
121118 "react" : " ^19.0.0" ,
122119 "react-dom" : " ^19.0.0" ,
120+ "safe-buffer" : " npm:@nolyfill/safe-buffer@^1.0.41" ,
121+ "safer-buffer" : " npm:@nolyfill/safer-buffer@^1.0.41" ,
123122 "ts-api-utils" : " ^2.0.0" ,
123+ "typedarray" : " npm:@nolyfill/typedarray@^1.0.29" ,
124124 "typescript" : " ^5.7.3"
125125 }
126126 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default async function Page(props: {
1414 const MDX = page . data . body ;
1515
1616 return (
17- < DocsPage toc = { page . data . toc } full = { ! ! page . data . full } >
17+ < DocsPage full = { ! ! page . data . full } toc = { page . data . toc } >
1818 < DocsTitle > { page . data . title } </ DocsTitle >
1919 < DocsDescription > { page . data . description } </ DocsDescription >
2020 < DocsBody >
@@ -36,7 +36,7 @@ export async function generateMetadata(props: {
3636 if ( ! page ) notFound ( ) ;
3737
3838 return {
39- title : page . data . title ,
4039 description : page . data . description ,
40+ title : page . data . title ,
4141 } ;
4242}
Original file line number Diff line number Diff line change @@ -13,38 +13,38 @@ import { Image } from "#/components/ui/image";
1313 * Docs Layout: app/docs/layout.tsx
1414 */
1515export const baseOptions : BaseLayoutProps = {
16- nav : {
17- title : (
18- < >
19- < Image src = { logo as StaticImageData } width = "20" height = "20" alt = "logo" /> ESLint React
20- </ >
21- ) ,
22- } ,
16+ githubUrl : "https://github.com/Rel1cx/eslint-react" ,
2317 links : [
2418 {
19+ active : "nested-url" ,
2520 text : "Getting Started" ,
2621 url : "/docs/getting-started" ,
27- active : "nested-url" ,
2822 } ,
2923 {
24+ active : "nested-url" ,
3025 text : "Rules" ,
3126 url : "/docs/rules" ,
32- active : "nested-url" ,
3327 } ,
3428 {
29+ active : "nested-url" ,
3530 text : "Presets" ,
3631 url : "/docs/presets" ,
37- active : "nested-url" ,
3832 } ,
3933 {
34+ active : "nested-url" ,
4035 text : "Roadmap" ,
4136 url : "/docs/roadmap" ,
42- active : "nested-url" ,
4337 } ,
4438 {
4539 text : "Changelog" ,
4640 url : "https://github.com/Rel1cx/eslint-react/releases" ,
4741 } ,
4842 ] ,
49- githubUrl : "https://github.com/Rel1cx/eslint-react" ,
43+ nav : {
44+ title : (
45+ < >
46+ < Image alt = "logo" height = "20" src = { logo as StaticImageData } width = "20" /> ESLint React
47+ </ >
48+ ) ,
49+ } ,
5050} ;
Original file line number Diff line number Diff line change @@ -9,21 +9,21 @@ export default function Layout({ children }: { children: ReactNode }) {
99 return (
1010 < ViewTransitions >
1111 < html lang = "en" suppressHydrationWarning >
12- < meta name = "msapplication-TileColor" content = "#fff " />
13- < meta httpEquiv = "Content-Language" content = "en " />
14- < meta name = "apple-mobile-web-app-title" content = "ESLint React " />
15- < meta name = "msapplication-TileImage" content = "/ms-icon-144x144.png" />
16- < meta name = "twitter:card" content = "summary_large_image " />
17- < meta name = "twitter:site" content = "https://eslint-react.xyz" />
12+ < meta content = "#fff" name = "msapplication-TileColor " />
13+ < meta content = "en" httpEquiv = "Content-Language " />
14+ < meta content = "ESLint React" name = "apple-mobile-web-app-title" />
15+ < meta content = "/ms-icon-144x144.png" name = "msapplication-TileImage " />
16+ < meta content = "summary_large_image" name = "twitter:card " />
17+ < meta content = "https://eslint-react.xyz" name = "twitter:site " />
1818 < link
19+ href = "https://eslint-react.xyz/apple-touch-icon.png"
1920 rel = "apple-touch-icon"
2021 sizes = "180x180"
21- href = "https://eslint-react.xyz/apple-touch-icon.png"
2222 />
2323 < link
24+ href = "https://eslint-react.xyz/favicon.png"
2425 rel = "icon"
2526 type = "image/png"
26- href = "https://eslint-react.xyz/favicon.png"
2727 />
2828 < body className = "flex flex-col min-h-screen" >
2929 < RootProvider > { children } </ RootProvider >
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { Image } from "./ui/image";
88export function ESLintReact ( ) {
99 return (
1010 < div className = "flex flex-col items-center gap-4 m-0 mx-auto p-8 w-fit" >
11- < Image src = { logo as StaticImageData } alt = "logo" width = "150" height = "150" />
11+ < Image alt = "logo" height = "150" src = { logo as StaticImageData } width = "150" />
1212 < span className = "text-2xl" > ESLint React</ span >
1313 </ div >
1414 ) ;
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import { Tweet } from "react-tweet";
44import { chunk } from "#/lib/chunk" ;
55import { cn } from "#/lib/cn" ;
66
7- export function TweetCards ( { tweets , className } : { tweets : string [ ] ; className ? : string } ) {
7+ export function TweetCards ( { className , tweets } : { className ? : string ; tweets : string [ ] } ) {
88 const chunkedTweets = useMemo ( ( ) => chunk ( tweets , 2 ) , [ tweets ] ) ;
99 return (
1010 < div className = { cn ( "grid grid-cols-1 md:grid-cols-2 md:gap-x-12 mt-8 max-w-3xl" , className ) } >
1111 { chunkedTweets . map ( ( chunk ) => (
12- < div key = { chunk . join ( "_" ) } className = "grid justify-center" >
12+ < div className = "grid justify-center" key = { chunk . join ( "_" ) } >
1313 { chunk . map ( ( id ) => (
14- < div key = { id } className = "h-fit max-w-full" >
14+ < div className = "h-fit max-w-full" key = { id } >
1515 < Tweet id = { id } />
1616 </ div >
1717 ) ) }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22title : Configurations
33---
44
5- import { TypeTable } from ' fumadocs-ui/components/type-table' ;
6- import { properties } from " ./configurations.data"
5+ import { ConfigurationsTypeTable } from " ./configurations"
76
87ESLint React provides the following configurations:
98
109## Properties
1110
12- <TypeTable type = { properties } />
11+ <ConfigurationsTypeTable />
1312
1413## Descriptions
1514
Original file line number Diff line number Diff line change 1+ /* eslint-disable perfectionist/sort-objects */
2+ import dedent from "dedent" ;
3+ import { DynamicCodeBlock } from "fumadocs-ui/components/dynamic-codeblock" ;
4+ import { TypeTable } from "fumadocs-ui/components/type-table" ;
5+ import { Link } from "next-view-transitions" ;
6+
7+ export function ConfigurationsTypeTable ( ) {
8+ return (
9+ < TypeTable
10+ type = { {
11+ version : {
12+ type : "string" ,
13+ description : < Link href = "#version" > React version to perform the analysis.</ Link > ,
14+ default : "detect" ,
15+ } ,
16+ importSource : {
17+ type : "string" ,
18+ description : < Link href = "#importsource" > The source where React is imported from.</ Link > ,
19+ default : "react" ,
20+ } ,
21+ polymorphicPropName : {
22+ type : "string" ,
23+ description : (
24+ < Link href = "#polymorphicpropname" > The prop your code uses to create polymorphic components.</ Link >
25+ ) ,
26+ default : "as" ,
27+ } ,
28+ additionalComponents : {
29+ type : "CustomComponent[]" ,
30+ description : < Link href = "#additionalcomponents" > An array of components and its attributes mapping.</ Link > ,
31+ default : "[]" ,
32+ typeDescription : (
33+ < DynamicCodeBlock
34+ code = { dedent `
35+ type CustomComponent = {
36+ name: string;
37+ as?: string;
38+ attributes?: {
39+ name: string;
40+ as?: string;
41+ defaultValue?: string;
42+ }[]
43+ }
44+ ` }
45+ lang = "ts"
46+ />
47+ ) ,
48+ } ,
49+ additionalHooks : {
50+ type : "Record<ReactBuiltInHookName, string[]>" ,
51+ description : < Link href = "#additionalhooks" > An object of aliases for React built-in Hooks.</ Link > ,
52+ default : "{}" ,
53+ typeDescription : (
54+ < DynamicCodeBlock
55+ code = { dedent `
56+ type ReactBuiltInHookName =
57+ | "use"
58+ | "useActionState"
59+ | "useCallback"
60+ | "useContext"
61+ | "useDebugValue"
62+ | "useDeferredValue"
63+ | "useEffect"
64+ | "useFormStatus"
65+ | "useId"
66+ | "useImperativeHandle"
67+ | "useInsertionEffect"
68+ | "useLayoutEffect"
69+ | "useMemo"
70+ | "useOptimistic"
71+ | "useReducer"
72+ | "useRef"
73+ | "useState"
74+ | "useSyncExternalStore"
75+ | "useTransition";
76+ ` }
77+ lang = "ts"
78+ />
79+ ) ,
80+ } ,
81+ } }
82+ />
83+ ) ;
84+ }
You can’t perform that action at this time.
0 commit comments