|
| 1 | +import { ESLintReact } from "#/components/eslint-react"; |
| 2 | +import { TweetCards } from "#/components/tweet-cards"; |
| 3 | +import { Link } from "next-view-transitions"; |
| 4 | + |
| 5 | +const features = [ |
| 6 | + ["Flexible", "Increased flexibility with more granular severity control."], |
| 7 | + ["Comprehensive", "First-class support for TypeScript, React 19, polymorphic components."], |
| 8 | + ["Advanced Analysis", "Handles complex scenarios and identifies problems that other tools might miss."], |
| 9 | +] as const; |
| 10 | + |
| 11 | +const packages = [ |
| 12 | + ["eslint-plugin-react-x", "Core rules (renderer-agnostic, compatible with x-platform)."], |
| 13 | + ["eslint-plugin-react-dom", "DOM specific rules for React DOM."], |
| 14 | + ["eslint-plugin-react-web-api", "Rules for interacting with Web APIs."], |
| 15 | + ["eslint-plugin-react-hooks-extra", "Extra React Hooks rules."], |
| 16 | + ["eslint-plugin-react-naming-convention", "Naming convention rules."], |
| 17 | +] as const; |
| 18 | + |
| 19 | +const tweets = [ |
| 20 | + "1865166494709026873", |
| 21 | + "1839913920984678890", |
| 22 | + "1841248980354941038", |
| 23 | + "1859137094976696467", |
| 24 | +]; |
| 25 | + |
| 26 | +export default function HomePage() { |
| 27 | + return ( |
| 28 | + <main className="w-full min-w-0 max-w-6xl px-8 pt-4 pb-12 md:px-12 mx-auto"> |
| 29 | + <ESLintReact /> |
| 30 | + <article className="prose max-w-none"> |
| 31 | + <p>Welcome to the ESLint React documentation.</p> |
| 32 | + <p>A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.</p> |
| 33 | + <h2>Features</h2> |
| 34 | + <ul> |
| 35 | + {features.map(([title, description]) => ( |
| 36 | + <li key={title}> |
| 37 | + <strong>{title}</strong>: {description} |
| 38 | + </li> |
| 39 | + ))} |
| 40 | + </ul> |
| 41 | + <h2>Public packages</h2> |
| 42 | + <h3>All-in-one plugins</h3> |
| 43 | + <ul> |
| 44 | + <li> |
| 45 | + <span> |
| 46 | + <Link href="https://www.npmjs.com/package/@eslint-react/eslint-plugin"> |
| 47 | + @eslint-react/eslint-plugin |
| 48 | + </Link>{" "} |
| 49 | + - The main ESLint plugin package including all rules and config presets in this repository. |
| 50 | + </span> |
| 51 | + </li> |
| 52 | + </ul> |
| 53 | + <h3>Modular plugins</h3> |
| 54 | + <ul> |
| 55 | + {packages.map(([name, description]) => ( |
| 56 | + <li key={name}> |
| 57 | + <span> |
| 58 | + <Link href={`https://www.npmjs.com/package/${name}`}> |
| 59 | + {name} |
| 60 | + </Link>{" "} |
| 61 | + - {description} |
| 62 | + </span> |
| 63 | + </li> |
| 64 | + ))} |
| 65 | + </ul> |
| 66 | + <TweetCards |
| 67 | + className="not-prose" |
| 68 | + tweets={tweets} |
| 69 | + /> |
| 70 | + <h2>FAQ</h2> |
| 71 | + <Link href="/docs/faq">Frequently Asked Questions ↗</Link> |
| 72 | + <h2>License</h2> |
| 73 | + This project is licensed under the MIT License - see the{" "} |
| 74 | + <a href="https://github.com/Rel1cx/eslint-react/blob/main/LICENSE">LICENSE</a> file for details. |
| 75 | + </article> |
| 76 | + </main> |
| 77 | + ); |
| 78 | +} |
0 commit comments