Skip to content

Commit fe975c8

Browse files
committed
chore: migrate from eslint+prettier to oxlint+oxfmt
- Replace ESLint + Prettier with Rust-based OxLint + Oxfmt tools - Remove 130 npm packages (ESLint plugins, TypeScript plugins, Prettier, globals) - Add oxlint (1.42.0) and oxfmt (0.27.0) as dev dependencies - Create .oxlintrc.json with React, TypeScript, and Vitest plugins - Create .oxfmtrc.json (migrated from Prettier config) - Update package.json scripts: lint, format, format:check - Update .vscode/settings.json for Oxc VSCode extension - Disable react-in-jsx-scope rule (using new JSX transform) - Fix QueryPrefetchTags jsx-key warning by adding key prop - Refactor useQueryInstance test to remove ErrorBoundary - Use try-catch in component instead of ErrorBoundary - Remove .concurrent from test file (avoid overlapping act() calls) - Eliminates stderr output during tests - Update AGENTS.md documentation for new tooling
1 parent 89c9388 commit fe975c8

9 files changed

Lines changed: 1116 additions & 2610 deletions

File tree

.oxfmtrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"arrowParens": "always",
4+
"bracketSameLine": true,
5+
"bracketSpacing": true,
6+
"printWidth": 100,
7+
"useTabs": false,
8+
"tabWidth": 2,
9+
"trailingComma": "es5",
10+
"singleQuote": true,
11+
"semi": false,
12+
"quoteProps": "consistent",
13+
"ignorePatterns": []
14+
}

.oxlintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["react", "typescript", "vitest"],
4+
"categories": {
5+
"correctness": "error",
6+
"suspicious": "warn"
7+
},
8+
"rules": {
9+
"react-in-jsx-scope": "off"
10+
},
11+
"settings": {
12+
"react": {
13+
"formComponents": [],
14+
"linkComponents": [],
15+
"version": "19.2",
16+
"componentWrapperFunctions": []
17+
},
18+
"vitest": {
19+
"typecheck": false
20+
}
21+
},
22+
"env": {
23+
"builtin": true,
24+
"browser": true
25+
},
26+
"globals": {},
27+
"ignorePatterns": ["dist", "coverage", "node_modules"]
28+
}

AGENTS.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ src/
5656

5757
## Code Style
5858

59-
### Formatting (Prettier)
59+
### Formatting (Oxfmt)
6060

6161
- Single quotes, no semicolons
6262
- 2-space indentation (no tabs)
6363
- 100 character line width
6464
- Trailing commas: `es5`
6565
- Always use parentheses in arrow functions: `(x) => x`
66+
- Configuration: `.oxfmtrc.json`
6667

6768
### Imports
6869

@@ -159,12 +160,14 @@ describe.concurrent('feature', function () {
159160
})
160161
```
161162

162-
## ESLint
163+
## OxLint
163164

164-
- TypeScript strict type checking enabled for `src/**`
165-
- React hooks rules for `src/react/**`
166-
- Solid.js rules for `src/solid/**`
167-
- Rule `@typescript-eslint/no-unnecessary-type-parameters` is disabled
165+
- Configuration: `.oxlintrc.json`
166+
- React plugin enabled with hooks rules
167+
- Vitest plugin enabled for test files
168+
- TypeScript plugin enabled
169+
- `react-in-jsx-scope` rule disabled (using new JSX transform)
170+
- Use `// oxlint-disable-next-line` to disable rules inline
168171

169172
## Environment
170173

eslint.config.js

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

0 commit comments

Comments
 (0)