Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

3 changes: 1 addition & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Code blocks support language-specific highlighting via Shiki. Common languages:
The documentation site uses a sophisticated MDX processing pipeline:

1. **Build Time**: MDX files in `/src/app/` are processed through Next.js's MDX loader
2. **Plugins Chain**:
2. **Plugins Chain**:
- Remark plugins handle Markdown transformations
- Rehype plugins process HTML (adding external link icons, etc.)
- Recma plugins handle JavaScript/JSX transformations
Expand Down Expand Up @@ -238,4 +238,3 @@ Update this note at each end of the task with the following format:
```

- **IMPORTANT**: Do not forget to update the note at the end of each task!!!

25 changes: 25 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals'

const config = [
...nextCoreWebVitals,
{
ignores: ['.next/**', 'node_modules/**', 'public/**']
},
{
rules: {
// Disabled to preserve patterns inherited from the upstream Tailwind UI
// Protocol template:
// - setMounted(true) / setModifierKey(...) in useEffect for SSR/CSR
// hydration gates (ThemeToggle, Search)
// - inputElement: inputRef.current passed during render to autocomplete
// getFormProps (Search)
// Both are upstream's chosen patterns; refactoring would diverge from the
// template without functional benefit. Revisit if upstream itself migrates
// these to useSyncExternalStore / ref-as-prop.
'react-hooks/set-state-in-effect': 'off',
'react-hooks/refs': 'off'
}
}
]

export default config
7 changes: 0 additions & 7 deletions jsconfig.json

This file was deleted.

8 changes: 0 additions & 8 deletions mdx-components.jsx

This file was deleted.

10 changes: 10 additions & 0 deletions mdx-components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { type MDXComponents } from 'mdx/types'

import * as mdxComponents from '@/components/mdx'

export function useMDXComponents(components: MDXComponents) {
return {
...components,
...mdxComponents
}
}
17 changes: 10 additions & 7 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
import nextMDX from '@next/mdx'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

import { recmaPlugins } from './src/mdx/recma.mjs'
import { rehypePlugins } from './src/mdx/rehype.mjs'
import { remarkPlugins } from './src/mdx/remark.mjs'
import withSearch from './src/mdx/search.mjs'

const __dirname = path.dirname(fileURLToPath(import.meta.url))

const withMDX = nextMDX({
options: {
remarkPlugins,
rehypePlugins,
recmaPlugins,
},
recmaPlugins
}
})

/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
experimental: {
outputFileTracingIncludes: {
'/**/*': ['./src/app/**/*.mdx'],
},
},
outputFileTracingRoot: __dirname,
outputFileTracingIncludes: {
'/**/*': ['./src/app/**/*.mdx']
}
}

export default withSearch(withMDX(nextConfig))
Loading
Loading