Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
3a5e15a
Feat: Integrate OXC for faster builds and improved Mincho transformat…
sangkukbae Oct 30, 2025
fb3547b
Feat: Add new example and package for OXC integration with Mincho.js
sangkukbae Dec 7, 2025
26dda39
Chore: Update TypeScript configuration files to include new package a…
sangkukbae Dec 7, 2025
601c254
Chore: Upgrade ESLint and related dependencies to version 9.39.0 acro…
sangkukbae Dec 7, 2025
06b5c25
Chore: Update package.json and tsconfig.lib.json to include type defi…
sangkukbae Dec 7, 2025
40d180b
Chore: Update TypeScript and ESLint configurations for OXC, including…
sangkukbae Dec 7, 2025
97423db
Chore: Add tsconfig.eslint.json path to OXC TypeScript configuration …
sangkukbae Dec 8, 2025
1905bff
Chore: Update output directory and build info file in tsconfig.eslint…
sangkukbae Dec 8, 2025
878b60a
Feat: Enhance minchoTransform to support CSS extraction and style imp…
sangkukbae Dec 8, 2025
fa61197
Chore: Refactor package.json in debug-log to streamline type definiti…
sangkukbae Dec 8, 2025
e2603f6
Chore: Update NodeBuilder to include 'ACTIONS' runtime environment in…
sangkukbae Dec 8, 2025
5ba2bcf
Chore: Refactor TypeScript configurations and update .gitignore for i…
sangkukbae Jan 9, 2026
f073162
Chore: Update package.json and debug-log to replace deep-diff with je…
sangkukbae Jan 9, 2026
6ae70aa
Chore: Add tsconfig.test.json path to OXC TypeScript configuration fo…
sangkukbae Jan 9, 2026
56b3d6e
Chore: Update TypeScript configurations in OXC to extend base config …
sangkukbae Jan 10, 2026
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ jobs:
uses: ./.github/actions/cache-dir
with:
key: build-and-test
paths: |
.cache
**/.cache
dist
**/dist
Comment on lines +106 to +110
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does dist also need caching?


- name: Test
run: yarn test
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ node_modules/
jspm_packages/

# Package Redirect - Sync with package.json "workspaces"
configs/*/**/package.json
packages/*/**/package.json
examples/*/**/package.json
# Keep root workspace manifests tracked while ignoring fixture manifests
configs/*/*/**/package.json
packages/*/*/**/package.json
examples/*/*/**/package.json

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
Expand Down Expand Up @@ -226,4 +227,4 @@ Temporary Items
.history/

# Built Visual Studio Code Extensions
*.vsix
*.vsix
17 changes: 8 additions & 9 deletions configs/eslint-config-custom/eslint.config.typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@

import { cwd } from "node:process";
import globals from "globals";
import { defineConfig } from "eslint/config";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import baseConfig from "./eslint.config.base.js";

/** @typedef {import("typescript-eslint").FlatConfig.Config} FlatConfig */
/** @typedef {import("typescript-eslint").InfiniteDepthConfigWithExtends} TSConfig */
/** @typedef {import("eslint").Linter.Config} Config */
/** @typedef {Config[]} ConfigArray */
/** @typedef {ReturnType<typeof tseslint.config>} ConfigArray */

/**
* @export
* @type {(userConfigs?: TSConfig) => ConfigArray}
* @type {(userConfigs?: TSConfig | TSConfig[]) => ConfigArray}
*/
export function eslintConfig(userConfigs = []) {
const normalizedUserConfigs = /** @type {ConfigArray} */ (
Array.isArray(userConfigs) ? userConfigs : [userConfigs ?? {}]
);
const normalizedUserConfigs = Array.isArray(userConfigs)
? userConfigs
: [userConfigs ?? {}];

return defineConfig(
return tseslint.config(
// == Typescript =============================================================
eslint.configs.recommended,
...tseslint.configs.recommended,
Expand Down Expand Up @@ -64,7 +63,7 @@ export function eslintConfig(userConfigs = []) {
extends: [tseslint.configs.disableTypeChecked]
},

...baseConfig,
.../** @type {TSConfig[]} */ (baseConfig),

...normalizedUserConfigs
);
Expand Down
5 changes: 3 additions & 2 deletions configs/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
}
},
"devDependencies": {
"@eslint/js": "^9.38.0",
"@eslint/core": "0.17.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

rg -n "@eslint/core" configs/eslint-config-custom/

Repository: mincho-js/mincho

Length of output: 42


🏁 Script executed:

# Check if @eslint/core is mentioned in package.json or if it's a peer dependency
cat configs/eslint-config-custom/package.json | grep -A 50 "dependencies\|peerDependencies"

Repository: mincho-js/mincho

Length of output: 42


🏁 Script executed:

# Also check if there are any comments or documentation about this dependency
rg -i "eslint.*core|core.*eslint" configs/eslint-config-custom/ -B 2 -A 2

Repository: mincho-js/mincho

Length of output: 42


🏁 Script executed:

cat configs/eslint-config-custom/package.json

Repository: mincho-js/mincho

Length of output: 933


🏁 Script executed:

find configs/eslint-config-custom -name "*.js" -type f

Repository: mincho-js/mincho

Length of output: 218


🏁 Script executed:

cat configs/eslint-config-custom/eslint.config.typescript.js

Repository: mincho-js/mincho

Length of output: 2053


🏁 Script executed:

cat configs/eslint-config-custom/eslint.config.base.js && echo "---" && cat configs/eslint-config-custom/eslint.config.yaml.js

Repository: mincho-js/mincho

Length of output: 1379


Remove unused @eslint/core dependency.

The @eslint/core package is added to devDependencies but is not imported or used anywhere in the package. The ESLint configuration files import from @eslint/js, eslint, and typescript-eslint, but never reference @eslint/core. This dependency should be removed.

🤖 Prompt for AI Agents
In configs/eslint-config-custom/package.json around line 20, remove the unused
devDependency entry for "@eslint/core": "0.17.0" because the package is not
imported or referenced anywhere in the repo; update the package.json by deleting
that dependency line and run npm/yarn install (or npm prune) to update lockfile
and node_modules accordingly.

"@eslint/js": "9.39.0",
"@types/node": "^24.9.1",
"@typescript-eslint/parser": "^8.46.2",
"eslint": "^9.38.0",
"eslint": "9.39.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-yml": "^1.19.0",
Expand Down
3 changes: 1 addition & 2 deletions configs/tsconfig-custom/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
"module": "NodeNext", /* Specify what module code is generated. */
// "rootDir": ".", /* Specify the root folder within your source files. */
"moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */
"baseUrl": ".", /* Specify the base directory to resolve non-relative module names. */
"paths": { /* Specify a set of entries that re-map imports to additional lookup locations. */
"@/*": ["src/*"]
"@/*": ["./src/*"]
},
Comment on lines 32 to 34
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find the base config and understand the structure
find . -name "tsconfig.base.json" -o -name "tsconfig*.json" | head -30

Repository: mincho-js/mincho

Length of output: 1256


🏁 Script executed:

# Get monorepo structure
ls -la | grep -E "^d"

Repository: mincho-js/mincho

Length of output: 707


🏁 Script executed:

# Find all tsconfig files extending the base config
rg -l "tsconfig-custom/tsconfig.base.json" --type json

Repository: mincho-js/mincho

Length of output: 505


🏁 Script executed:

# For each file that extends the base config, check if it overrides paths
rg "tsconfig-custom/tsconfig.base.json" --type json -A 50 | grep -E "(tsconfig|paths|@/)"

Repository: mincho-js/mincho

Length of output: 12186


🏁 Script executed:

# Check which packages actually use @/* imports
rg "@/" --type ts --type tsx | head -50

Repository: mincho-js/mincho

Length of output: 87


🏁 Script executed:

# Specifically check packages/oxc which extends base without overriding paths or baseUrl
cat packages/oxc/tsconfig.json

Repository: mincho-js/mincho

Length of output: 456


🏁 Script executed:

# Check if packages that extend base actually have src directories at the expected locations
find packages -type d -name "src" | head -20

Repository: mincho-js/mincho

Length of output: 286


🏁 Script executed:

# Look at the base config more closely to understand paths definition
cat configs/tsconfig-custom/tsconfig.base.json

Repository: mincho-js/mincho

Length of output: 13123


🏁 Script executed:

# Check for @/ imports in packages/oxc
rg "@/" packages/oxc/ --type ts

Repository: mincho-js/mincho

Length of output: 42


🏁 Script executed:

# Check all packages for @/ usage to understand scope of issue
rg "@/" --type ts -c | sort -rn

Repository: mincho-js/mincho

Length of output: 643


🏁 Script executed:

# Look at packages/oxc/src to see what it imports
ls -la packages/oxc/src/

Repository: mincho-js/mincho

Length of output: 601


🏁 Script executed:

# Check if there are any import errors or build warnings related to path resolution
rg "Cannot find" --type ts --type js 2>/dev/null || echo "No errors found"

Repository: mincho-js/mincho

Length of output: 75


🏁 Script executed:

# Double-check packages that extend base without baseUrl override
# to ensure they don't use @/ imports
rg "@/" packages/debug-log/ --type ts
rg "@/" packages/css-additional-types/ --type ts
rg "@/" configs/vite-config-custom/ --type ts

Repository: mincho-js/mincho

Length of output: 42


🏁 Script executed:

# Verify the actual path resolution by checking packages that use @/
# Look at transform-to-vanilla which uses @/ and sets baseUrl
cat packages/transform-to-vanilla/tsconfig.lib.json | grep -A 5 "baseUrl\|paths"

Repository: mincho-js/mincho

Length of output: 225


Base config's path mappings work in practice, but the design lacks defensiveness.

The change from "src/*" to "./src/*" is correct and explicit. Without baseUrl in the base config, these paths resolve relative to configs/tsconfig-custom/, which doesn't contain src/. However, all packages currently using @/* imports either override baseUrl: "./" (transform-to-vanilla, integration) or explicitly override paths (babel), so this works correctly in practice.

The design risk remains valid: if a future package uses @/* imports without setting baseUrl, it will silently fail to resolve. Packages not using the alias (oxc, debug-log, css-additional-types) safely inherit the broken paths without consequence.

Consider documenting that all packages extending this config must either set baseUrl or explicitly override paths, or alternatively, remove paths from the base config entirely and require all packages to define it.

🤖 Prompt for AI Agents
In configs/tsconfig-custom/tsconfig.base.json around lines 32-34, the shared
"paths" mapping uses "./src/*" but the base config lacks a baseUrl so those
paths resolve relative to the configs folder and can silently break for packages
that don't override baseUrl; update the base config to be defensive by either
(A) add "baseUrl": "./" alongside "paths" so the alias reliably resolves to the
repository root for inheriting projects, or (B) remove "paths" from this base
file and require each package tsconfig to define its own "baseUrl" and "paths";
alternatively add a short comment/docblock in the base file instructing package
authors that any config extending this must explicitly set baseUrl or override
paths.

// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
Expand Down
6 changes: 5 additions & 1 deletion configs/vite-config-custom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ function NodeBuilder(viteConfigEnv: ConfigEnv) {

const runtimeEnv = getRuntimeEnv();
if (ViteEnv.isProd()) {
if (runtimeEnv === "LOCAL" || runtimeEnv === "PUBLISH") {
if (
runtimeEnv === "LOCAL" ||
runtimeEnv === "PUBLISH" ||
runtimeEnv === "ACTIONS"
) {
plugins.add(
// This is currently a proprietary implementation. You might also like to see
// https://github.com/qmhc/vite-plugin-dts/issues/267
Expand Down
5 changes: 4 additions & 1 deletion configs/vite-config-custom/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"files": [],
"compilerOptions": {
"composite": true
},
Comment on lines +3 to +5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this option?

"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.lib.json" }
]
}
}
4 changes: 4 additions & 0 deletions configs/vite-config-custom/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"extends": "tsconfig-custom/tsconfig.node.json",
"compilerOptions": {
"composite": true,
"noEmit": false,
"declaration": true,
"emitDeclarationOnly": true,
Comment on lines +4 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the node type should not be emitted, as it is only used for type checking for build purposes.

"tsBuildInfoFile": "./.cache/typescript/tsbuildinfo-node",
"outDir": "./.cache/tsbuild-node"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
"scheduler": "^0.27.0"
},
"devDependencies": {
"@eslint/js": "^9.38.0",
"@eslint/js": "9.39.0",
"@types/babel__core": "^7.20.5",
"@types/cssesc": "^3.0.2",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@types/scheduler": "^0.26.0",
"@typescript-eslint/parser": "^8.46.2",
"@vitejs/plugin-react": "^5.0.4",
"eslint": "^9.38.0",
"eslint": "9.39.0",
"eslint-plugin-react-hooks": "^7.0.0",
"eslint-plugin-react-refresh": "^0.4.24",
"globals": "^16.4.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/react-babel/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
"noUncheckedSideEffectImports": true,

/* Path Aliases for Workspace Packages */
"baseUrl": "../../",
"paths": {
"@mincho-js/react": ["packages/react/src"],
"@mincho-js/css": ["packages/css/src"],
"@mincho-js/vite": ["packages/vite/src"]
"*": ["../../*"],
"@mincho-js/react": ["../../packages/react/src"],
"@mincho-js/css": ["../../packages/css/src"],
"@mincho-js/vite": ["../../packages/vite/src"]
Comment on lines +31 to +34
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove them all.

},
Comment on lines 29 to 35
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Inspecting tsconfig.app.json ==="
cat -n examples/react-babel/tsconfig.app.json 2>/dev/null || echo "File not found"

echo
echo "=== All tsconfig files in examples/react-babel ==="
fd -a '^tsconfig.*\.json$' examples/react-babel -x echo {} 2>/dev/null || true

echo
echo "=== Check for extends and baseUrl in tsconfig.app.json ==="
rg -n '"extends"|"baseUrl"' examples/react-babel/tsconfig.app.json 2>/dev/null || echo "No extends or baseUrl found"

echo
echo "=== Check what tsconfig.app.json extends from (if anything) ==="
grep -i extends examples/react-babel/tsconfig.app.json || echo "No extends directive"

echo
echo "=== Inspect parent tsconfig in examples/ ==="
fd -a '^tsconfig.*\.json$' examples -maxdepth 1 -x echo {} 2>/dev/null || true

echo
echo "=== Imports in examples/react-babel/src - look for bare/monorepo paths ==="
find examples/react-babel/src -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) 2>/dev/null | head -20

Repository: mincho-js/mincho

Length of output: 1991


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== All import statements in examples/react-babel/src ==="
rg -n "^import|^export.*from" examples/react-babel/src/ -t ts -t tsx --max-count=50 2>/dev/null || true

echo
echo "=== Check for subpath imports of @mincho-js/* ==="
rg -n '@mincho-js/[^"'\'']+/' examples/react-babel/src/ -t ts -t tsx 2>/dev/null || echo "No subpath imports found"

echo
echo "=== Check what non-relative, non-@scope imports exist ==="
rg -n 'from\s+["\x27](?![./])([a-z])' examples/react-babel/src/ -t ts -t tsx --max-count=30 2>/dev/null || true

Repository: mincho-js/mincho

Length of output: 252


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check tsconfig hierarchy - root and examples ==="
if [ -f tsconfig.json ]; then
  echo "Root tsconfig.json exists"
  grep -E '"extends"|"baseUrl"' tsconfig.json || echo "No extends/baseUrl in root"
fi

echo
echo "=== Check if examples/tsconfig.json exists ==="
if [ -f examples/tsconfig.json ]; then
  echo "examples/tsconfig.json content:"
  cat -n examples/tsconfig.json
fi

echo
echo "=== Verify structure of examples/react-babel ==="
ls -la examples/react-babel/ | grep -E "tsconfig|src" || true

Repository: mincho-js/mincho

Length of output: 514


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== examples/react-babel/tsconfig.json ==="
cat -n examples/react-babel/tsconfig.json

echo
echo "=== Source files in examples/react-babel/src ==="
for file in examples/react-babel/src/*.tsx examples/react-babel/src/*.ts; do
  if [ -f "$file" ]; then
    echo "--- $file ---"
    cat -n "$file"
    echo
  fi
done

Repository: mincho-js/mincho

Length of output: 2687


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== TypeScript paths behavior verification ==="
echo "TS docs: paths without baseUrl are typically ignored or baseUrl defaults to '.'"
echo "Checking if moduleResolution affects this..."

echo
echo "=== Check tsconfig.node.json ==="
cat -n examples/react-babel/tsconfig.node.json

echo
echo "=== Verify what import patterns actually exist ==="
rg -n 'import\s+' examples/react-babel/src/ -A 1 2>/dev/null || echo "No imports found"

Repository: mincho-js/mincho

Length of output: 1467


Configuration is functional but could be cleaner

The tsconfig.app.json uses moduleResolution: "bundler", which implicitly treats baseUrl as "." when not explicitly set, so the @mincho-js/* path aliases work as intended. However, the "*": ["../../*"] catch-all is unnecessarily broad. While it doesn't currently mask missing external dependencies (since packages like react and react-dom resolve to node_modules first), removing it and adding an explicit baseUrl would improve clarity and reduce potential confusion:

Suggested tightening
 {
   "compilerOptions": {
+    "baseUrl": ".",
     /* Path Aliases for Workspace Packages */
     "paths": {
-      "*": ["../../*"],
       "@mincho-js/react": ["../../packages/react/src"],
       "@mincho-js/css": ["../../packages/css/src"],
       "@mincho-js/vite": ["../../packages/vite/src"]
     },

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In @examples/react-babel/tsconfig.app.json around lines 29 - 35, The tsconfig
uses moduleResolution: "bundler" and an overly-broad catch-all path mapping "*"
which is unnecessary and can mask resolution intent; remove the "*" :
["../../*"] entry from the "paths" block and add an explicit "baseUrl": "." at
the top-level of tsconfig.app.json so the @mincho-js/* aliases (e.g.,
"@mincho-js/react", "@mincho-js/css", "@mincho-js/vite") continue to resolve to
../../packages/... while keeping module resolution explicit and avoiding the
wildcard mapping.


"tsBuildInfoFile": "./.cache/typescript/tsbuildinfo-app"
Expand Down
14 changes: 0 additions & 14 deletions examples/react-babel/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,4 @@ export default defineConfig({
// Add React plugin without custom Babel config
react(),
],
esbuild: {
jsxInject: `import React from "react"`,
},
build: {
rollupOptions: {
external: [],
output: {
manualChunks: undefined,
},
},
},
resolve: {
preserveSymlinks: true,
},
});
24 changes: 24 additions & 0 deletions examples/react-oxc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
75 changes: 75 additions & 0 deletions examples/react-oxc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## React Compiler

The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information.

Note: This will impact Vite dev & build performances.

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,

// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
```
32 changes: 32 additions & 0 deletions examples/react-oxc/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
import { fileURLToPath } from 'node:url'
import { dirname } from 'node:path'

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

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
tsconfigRootDir: __dirname,
projectService: true,
project: ['tsconfig.json']
},
},
},
])
13 changes: 13 additions & 0 deletions examples/react-oxc/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>react-oxc</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
36 changes: 36 additions & 0 deletions examples/react-oxc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "react-oxc",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@mincho-js/css": "workspace:^",
"@mincho-js/integration": "workspace:^",
"@mincho-js/react": "workspace:^",
"@mincho-js/vite": "workspace:^",
"@vanilla-extract/css": "^1.17.4",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
"devDependencies": {
"@eslint/js": "9.39.0",
"@types/node": "^24.6.0",
"@types/react": "^19.1.16",
"@types/react-dom": "^19.1.9",
"@vitejs/plugin-react": "^5.0.4",
"babel-plugin-react-compiler": "^19.1.0-rc.3",
"eslint": "9.39.0",
"eslint-plugin-react-hooks": "^5.2.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check eslint-plugin-react-hooks versions across examples
rg -n "eslint-plugin-react-hooks" examples/*/package.json

Repository: mincho-js/mincho

Length of output: 295


Consolidate eslint-plugin-react-hooks versions across examples.

react-oxc uses ^5.2.0 while react-babel and react-swc both use ^7.0.0. This major version difference can cause inconsistent linting behavior across the examples and should be aligned.

🤖 Prompt for AI Agents
In examples/react-oxc/package.json around line 29, the project pins
"eslint-plugin-react-hooks" to "^5.2.0" which is a major-version mismatch with
the "^7.0.0" used in react-babel and react-swc; update the dependency to the
same major version (e.g., "^7.0.0") to align linting across examples, run
npm/yarn install to update lockfile, and verify linting passes in the react-oxc
example.

"eslint-plugin-react-refresh": "^0.4.22",
"globals": "^16.4.0",
"typescript": "~5.9.3",
"typescript-eslint": "^8.45.0",
"vite": "^7.1.7"
}
}
1 change: 1 addition & 0 deletions examples/react-oxc/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading