Skip to content

Commit 9504173

Browse files
Merge branch 'source' into governance-tooling
2 parents 7b49deb + b8b78d1 commit 9504173

3,558 files changed

Lines changed: 114275 additions & 9667 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.cjs

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ const MARKDOWN_EXT = "md,mdx"
55

66
module.exports = {
77
root: true,
8-
plugins: ["@graphql-eslint", "mdx", "@typescript-eslint", "tailwindcss"],
8+
plugins: [
9+
"@graphql-eslint",
10+
"mdx",
11+
"@typescript-eslint",
12+
"tailwindcss",
13+
"react",
14+
"@next/next",
15+
"react-hooks",
16+
],
917
overrides: [
1018
{
1119
files: [`**/*.{${CODE_EXT}}`],
@@ -14,33 +22,67 @@ module.exports = {
1422
"plugin:@typescript-eslint/recommended",
1523
"plugin:tailwindcss/recommended",
1624
"prettier",
25+
"plugin:@next/next/recommended",
26+
"plugin:react-hooks/recommended-legacy",
27+
"plugin:react/recommended",
1728
],
1829
rules: {
19-
"tailwindcss/classnames-order": "off",
20-
"@typescript-eslint/no-restricted-imports": [
21-
"error",
30+
"react/react-in-jsx-scope": "off", // TS checks this
31+
"react/prop-types": "off", // and this
32+
"no-undef": "off", // and this too
33+
// This is type checking for projects without `@types/react`. Disabled due to false positives.
34+
"react/no-unknown-property": "off",
35+
36+
"react/no-unescaped-entities": [
37+
"warn", // quotes and apostrophes are okay
2238
{
23-
paths: [
39+
forbid: [
2440
{
25-
name: "next/image",
26-
message: "Please use `next-image-export-optimizer` instead",
27-
allowTypeImports: true,
41+
char: "<",
42+
alternatives: ["&lt;"],
43+
},
44+
{
45+
char: ">",
46+
alternatives: ["&gt;"],
47+
},
48+
{
49+
char: "{",
50+
alternatives: ["&#123;"],
51+
},
52+
{
53+
char: "}",
54+
alternatives: ["&#125;"],
2855
},
2956
],
3057
},
3158
],
59+
"@next/next/no-img-element": "off", // straight up upsell, small `img`s actually don't need optimization
60+
61+
"tailwindcss/classnames-order": "off",
3262
"prefer-const": ["error", { destructuring: "all" }],
3363
"prefer-rest-params": "off",
3464
"@typescript-eslint/no-explicit-any": "off",
3565
"@typescript-eslint/no-unused-vars": "off",
3666
"@typescript-eslint/ban-ts-comment": "off",
3767
"@typescript-eslint/no-var-requires": "off",
3868
"@typescript-eslint/ban-types": "off",
69+
"no-restricted-syntax": [
70+
"error",
71+
{
72+
selector:
73+
"JSXElement[openingElement.name.name=/^(Image|NextImage)$/]:not(:has(JSXAttribute[name.name='placeholder']))",
74+
message:
75+
"Pass `placeholder: 'empty' | 'blur'` when calling <Image> or <NextImage>.",
76+
},
77+
],
3978
},
4079
settings: {
4180
tailwindcss: {
4281
whitelist: ["roboto-mono"],
4382
},
83+
react: {
84+
version: "detect",
85+
},
4486
},
4587
},
4688
{
@@ -63,6 +105,8 @@ module.exports = {
63105
},
64106
rules: {
65107
"mdx/remark": "error",
108+
"no-unused-expressions": "off",
109+
"react/jsx-no-undef": "off",
66110
},
67111
},
68112
{
@@ -90,7 +134,9 @@ module.exports = {
90134
{
91135
files: [
92136
`src/pages/blog/**/*.{${MARKDOWN_EXT}}`,
137+
`src/pages/graphql-js/running-an-express-graphql-server.mdx`,
93138
`src/code/**/*.{${MARKDOWN_EXT}}`,
139+
`src/app/conf/**/*.{${MARKDOWN_EXT}}`,
94140
],
95141
rules: {
96142
// Disable `remark-lint-first-heading-level` since in blogs we don't want to enforce the first heading to be an `h1`

.github/workflows/check.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: lint & test
2+
3+
on: pull_request
4+
5+
jobs:
6+
check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- uses: the-guild-org/shared-config/setup@main
12+
name: setup env
13+
with:
14+
packageManager: pnpm
15+
workingDirectory: ./
16+
17+
- name: Install Dependencies
18+
run: pnpm i
19+
20+
- name: Run ESLint
21+
run: pnpm lint --quiet
22+
23+
- name: Run Prettier Check
24+
run: pnpm format:check
25+
26+
- name: Validate code snippets
27+
run: pnpm validate:snippets
28+
29+
unit-test:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- uses: the-guild-org/shared-config/setup@main
35+
name: setup env
36+
with:
37+
packageManager: pnpm
38+
workingDirectory: ./
39+
40+
- name: Install Dependencies
41+
run: pnpm i
42+
43+
- name: Run unit tests
44+
run: pnpm test:unit
45+
46+
playwright:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- uses: the-guild-org/shared-config/setup@main
52+
name: setup env
53+
with:
54+
packageManager: pnpm
55+
workingDirectory: ./
56+
57+
- name: Install Dependencies
58+
run: pnpm i
59+
60+
# per the docs: "caching browser binaries is not recommended,
61+
# since the amount of time it takes to restore the cache is
62+
# comparable to the time it takes to download the binaries"
63+
- name: Install Playwright Browsers
64+
run: ./node_modules/.bin/playwright install --with-deps
65+
66+
- name: Build the website
67+
run: pnpm build
68+
69+
- name: Run end-to-end tests
70+
run: ./node_modules/.bin/playwright test
71+
72+
- uses: actions/upload-artifact@v4
73+
if: ${{ !cancelled() }}
74+
with:
75+
name: playwright-report
76+
path: playwright-report/
77+
retention-days: 30
78+
79+
# - uses: valeriangalliat/action-sshd-cloudflared@v1
80+
# if: failure()
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Sched's API rate limits are very limited, so we sync non-critical part of the data on a cron.
2+
on:
3+
workflow_dispatch:
4+
# schedule:
5+
# - cron: "*/10 * * * *" # every ten minutes
6+
7+
jobs:
8+
sync:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Sync conference data from Sched
17+
run: |
18+
tsx scripts/sync-sched/sync.ts --year 2025
19+
env:
20+
SCHED_ACCESS_TOKEN_2025: ${{ secrets.SCHED_ACCESS_TOKEN_2025 }}
21+
22+
- name: Commit changes
23+
uses: stefanzweifel/git-auto-commit-action@v5
24+
with:
25+
file_pattern: "scripts/sync-sched/*.json"
26+
commit_message: "Sync conference data from Sched"

.github/workflows/docs-validation.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/prettier.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ src/__generated__/
6161
.next/
6262
public/sitemap.xml
6363
out/
64+
65+
tsconfig.tsbuildinfo
66+
67+
playwright-report/
68+
69+
.pnpm-store/

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.12.0
1+
22.21.1

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ pnpm-lock.yaml
44
!src/pages/blog/2024-04-11-announcing-new-graphql-website/index.mdx
55
!src/pages/blog/2024-08-15-graphql-local-initiative.mdx
66
!src/pages/community/foundation/community-grant.mdx
7+
!src/pages/blog/2025-05-31-graphiql-4/index.mdx
8+
!src/pages/blog/2025-06-10-graphiql-5/index.mdx
9+
!src/pages/blog/2025-06-19-multioption-inputs-with-oneof/index.mdx
710
*.jpg
11+
12+
scripts/**/*.json

.prettierrc

Lines changed: 0 additions & 22 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,14 @@
99
"[typescript]": {
1010
"editor.defaultFormatter": "esbenp.prettier-vscode"
1111
},
12-
"tailwindCSS.classFunctions": ["clsx"]
12+
"tailwindCSS.classFunctions": ["clsx"],
13+
"files.associations": {
14+
"*.css": "tailwindcss"
15+
},
16+
"editor.quickSuggestions": {
17+
"strings": "on"
18+
},
19+
"typescript.preferences.autoImportFileExcludePatterns": [
20+
"**/node_modules/lucide-react"
21+
]
1322
}

0 commit comments

Comments
 (0)