Skip to content

Commit 92a7948

Browse files
authored
feat(website): add community section and integrate bsky-react-post component (#1021)
1 parent 6a92296 commit 92a7948

File tree

14 files changed

+177
-28
lines changed

14 files changed

+177
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ More than 80 high-quality linting rules to identify possible problems in your Re
2626

2727
### All-In-One
2828

29-
- [`@eslint-react/eslint-plugin`](https://www.npmjs.com/package/@eslint-react/eslint-plugin) - Main plugin combining all rules and presets from the above packages.
29+
- [`@eslint-react/eslint-plugin`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin) - Main plugin combining all rules and presets from the above packages.
3030

3131
## Installation
3232

apps/website/app/(home)/page.tsx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ESLintReact } from "#/components/eslint-react";
2+
23
import { Card, Cards } from "fumadocs-ui/components/card";
34

45
import { Link } from "next-view-transitions";
@@ -10,6 +11,39 @@ const features = [
1011
["Comprehensive", "Handles complex scenarios and identifies problems that other tools might miss."],
1112
] as const;
1213

14+
const plugins = [
15+
[
16+
"eslint-plugin-react-x",
17+
"Core rules (renderer-agnostic, compatible with x-platform).",
18+
"https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x",
19+
],
20+
[
21+
"eslint-plugin-react-dom",
22+
"DOM specific rules for React DOM.",
23+
"https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom",
24+
],
25+
[
26+
"eslint-plugin-react-web-api",
27+
"Rules for interacting with Web APIs.",
28+
"https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-web-api",
29+
],
30+
[
31+
"eslint-plugin-react-hooks-extra",
32+
"Extra React Hooks rules.",
33+
"https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-hooks-extra",
34+
],
35+
[
36+
"eslint-plugin-react-naming-convention",
37+
"Naming convention rules.",
38+
"https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-naming-convention",
39+
],
40+
[
41+
"@eslint-react/eslint-plugin",
42+
"Main plugin combining all rules and presets from the above packages.",
43+
"https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin",
44+
],
45+
] as const;
46+
1347
export default function HomePage() {
1448
return (
1549
<main className="w-full min-w-0 max-w-6xl px-8 pt-4 pb-12 md:px-12 mx-auto">
@@ -22,6 +56,12 @@ export default function HomePage() {
2256
<Cards className="grid grid-cols-1 gap-4 md:grid-cols-4">
2357
{features.map(([title, description]) => <Card description={description} key={title} title={title} />)}
2458
</Cards>
59+
<h2>ESLint Plugins</h2>
60+
<Cards className="grid grid-cols-1 gap-4 md:grid-cols-2">
61+
{plugins.map(([title, description, href]) => (
62+
<Card description={description} href={href} key={title} title={title} />
63+
))}
64+
</Cards>
2565
<h2>Roadmap</h2>
2666
<p>
2767
Check out the <Link href="/roadmap">roadmap</Link> to see what's planned for the future.

apps/website/app/layout.config.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,24 @@ export const baseOptions: BaseLayoutProps = {
3232
},
3333
{
3434
active: "nested-url",
35-
text: "Roadmap",
36-
url: "/docs/roadmap",
35+
text: "Community",
36+
url: "/docs/community",
3737
},
3838
{
39+
active: "nested-url",
3940
text: "Changelog",
4041
url: "/docs/changelog",
4142
},
43+
{
44+
active: "nested-url",
45+
text: "Roadmap",
46+
url: "/docs/roadmap",
47+
},
48+
{
49+
active: "nested-url",
50+
text: "FAQ",
51+
url: "/FAQ",
52+
},
4253
],
4354
nav: {
4455
title: (

apps/website/app/overrides.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@ figure.fd-codeblock.shiki {
8383
/* improve code block readability */
8484
background-color: color-mix(in oklab, var(--color-fd-secondary) 25%, transparent);
8585
}
86+
87+
.bsky-post [class^="embed-module_externalThumbnail"] {
88+
display: none;
89+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { cn } from "#/lib/cn";
2+
import { Post } from "bsky-react-post";
3+
import "bsky-react-post/theme.css";
4+
5+
export interface BskyPostProps {
6+
id: string;
7+
classNames?: string;
8+
handle: string;
9+
}
10+
11+
export function BskyPost({ id, classNames, handle }: BskyPostProps) {
12+
return (
13+
<div className={cn("bsky-post", "not-prose", "my-8", classNames)}>
14+
<Post handle={handle} id={id} />
15+
</div>
16+
);
17+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Card, Cards } from "fumadocs-ui/components/card";
2+
3+
const presets = [
4+
{
5+
description: "Anthony's ESLint config preset",
6+
name: "antfu/eslint-config",
7+
link: "https://github.com/antfu/eslint-config",
8+
},
9+
{
10+
description: "Rebecca's ESLint config preset",
11+
name: "eslint-config-rebeccastevens",
12+
link: "https://github.com/RebeccaStevens/eslint-config-rebeccastevens",
13+
},
14+
{
15+
description: "A comprehensive and opinionated Typescript-first ESLint configuration",
16+
name: "eslint-config-sheriff",
17+
link: "https://github.com/AndreaPontrandolfo/sheriff",
18+
},
19+
{
20+
description: "Sukka's ESLint config preset",
21+
name: "eslint-config-sukka",
22+
link: "https://github.com/SukkaW/eslint-config-sukka",
23+
},
24+
];
25+
26+
export function CommunityPresets() {
27+
return (
28+
<Cards className="grid grid-cols-1 gap-4 md:grid-cols-2">
29+
{presets.map((preset) => (
30+
<Card description={preset.description} href={preset.link} key={preset.name} title={preset.name} />
31+
))}
32+
</Cards>
33+
);
34+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Community
3+
description: "Discover the growing community around ESLint React"
4+
---
5+
6+
import { BskyPost } from "../../components/widgets/bsky-post";
7+
import { CommunityPresets } from "../../components/widgets/community-presets";
8+
9+
## OSS Projects Using ESLint React
10+
11+
[![used-by](/used_by.png)](https://github.com/Rel1cx/eslint-react/blob/main/assets/NOTABLE_PROJECTS_USING_ESLINT_REACT)
12+
13+
<small>
14+
15+
_Data collected from GitHub dependents network, if there are any mismatch or outdated information, feel free to [open issue](https://github.com/Rel1cx/eslint-react/issues/new?assignees=&labels=type%3A+documentation&projects=&template=docs_report.md&title=%5Bdocs%5D+) or pull request._
16+
17+
</small>
18+
19+
## Adoption Feedback on Social Media
20+
21+
<BskyPost handle="tkdodo.eu" id="3lbn55t5d5s24" />
22+
23+
Find more on [https://x.com/search?q=eslint-react.xyz](https://x.com/search?q=eslint-react.xyz&src=typed_query&f=live).
24+
25+
---
26+
27+
## See Also
28+
29+
**Community Maintained Presets**
30+
31+
<CommunityPresets />

apps/website/content/docs/getting-started/javascript.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,3 @@ export default defineConfig([
6262

6363
- [Configure ESLint](https://eslint.org/docs/latest/use/configure/)
6464
- [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
65-
- [WebStorm ESLint integration](https://www.jetbrains.com/help/webstorm/eslint.html)

apps/website/content/docs/getting-started/typescript.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,3 @@ export default tseslint.config({
5959

6060
- [Configure ESLint](https://eslint.org/docs/latest/use/configure/)
6161
- [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
62-
- [WebStorm ESLint integration](https://www.jetbrains.com/help/webstorm/eslint.html)

apps/website/content/docs/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"!advanced-configuration",
1111
"!using-an-alternative-parser",
1212
"---Other---",
13+
"community",
1314
"changelog",
1415
"roadmap",
15-
"used-by",
1616
"faq"
1717
]
1818
}

0 commit comments

Comments
 (0)