Skip to content

Commit b6e8340

Browse files
committed
chore: migrate to eslint and prettier
1 parent 6f73c7a commit b6e8340

45 files changed

Lines changed: 586 additions & 384 deletions

Some content is hidden

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

.cspell/packages.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ fumadocs
66
lokalise
77
nuqs
88
orpc
9-
oxfmt
10-
oxlint
119
radixui
1210
rmiz
1311
shiki

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Configure environment
4545
uses: ./.github/actions/setup
4646

47-
- name: Run Oxlint
47+
- name: Run ESLint
4848
run: bun lint
4949

5050
spellcheck:
@@ -83,7 +83,7 @@ jobs:
8383
- name: Configure environment
8484
uses: ./.github/actions/setup
8585

86-
- name: Run Oxfmt format check
86+
- name: Run Prettier format check
8787
run: bun format:check
8888

8989
knip:

.vscode/settings.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.fixAll.oxc": "always"
3+
"source.fixAll.eslint": "always"
44
},
55

6-
"oxc.fmt.configPath": "oxfmt.config.ts",
7-
8-
"editor.defaultFormatter": "oxc.oxc-vscode",
96
"editor.formatOnPaste": true,
107
"editor.formatOnSave": true,
118

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Welcome to my personal blog and portfolio website! This repository contains a mo
5757

5858
- Vitest for unit/integration testing
5959
- Playwright for E2E testing
60-
- Oxlint configuration
61-
- Oxfmt code formatting
60+
- ESLint configuration
61+
- Prettier code formatting
6262
- Lefthook
6363
- Conventional commit
6464

@@ -194,9 +194,9 @@ The services will be available at the following URLs:
194194
bun dev # Start development server
195195
bun run build # Build for production
196196
bun start # Start production server
197-
bun lint # Run Oxlint
197+
bun lint # Run ESLint
198198
bun typecheck # Run TypeScript type checking
199-
bun format # Format code with Oxfmt
199+
bun format # Format code with Prettier
200200
bun test:unit # Run unit tests
201201
bun test:e2e # Run E2E tests
202202
bun db:migrate # Run database migrations

bun.lock

Lines changed: 445 additions & 252 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { defineConfig } from '@nelsonlaidev/eslint-config'
2+
3+
export default defineConfig(
4+
{
5+
tailwindcss: {
6+
entryPoint: 'src/styles/globals.css',
7+
rootFontSize: 16,
8+
ignore: ['not-prose', 'shiki', 'toaster'],
9+
},
10+
playwright: {
11+
files: [`src/tests/e2e/**/*.test.{ts,tsx}`],
12+
assertFunctionNames: ['a11y', 'checkAppliedTheme', 'checkStoredTheme'],
13+
},
14+
vitest: {
15+
files: [`src/tests/unit/**/*.test.{ts,tsx}`],
16+
},
17+
},
18+
{
19+
files: ['src/components/ui/*.fixture.tsx'],
20+
rules: {
21+
'@next/next/no-html-link-for-pages': 'off',
22+
},
23+
},
24+
{
25+
files: ['**/*.{ts,tsx}'],
26+
rules: {
27+
'no-restricted-imports': [
28+
'error',
29+
{
30+
paths: [
31+
{
32+
name: '@tanstack/react-table',
33+
importNames: ['useReactTable'],
34+
message: 'Please use the custom hook from `@/hooks/use-react-table` instead.',
35+
},
36+
],
37+
},
38+
],
39+
},
40+
},
41+
)

lefthook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ pre-commit:
22
parallel: true
33
jobs:
44
- name: format
5-
run: bun oxfmt --no-error-on-unmatched-pattern "{staged_files}"
5+
run: bun prettier --write --ignore-unknown "{staged_files}"
66
stage_fixed: true
77

88
- name: lint
99
glob: '*.{js,jsx,cjs,mjs,ts,tsx,cts,mts,d.ts,d.cjs,d.mts}'
10-
run: bun oxlint --fix "{staged_files}"
10+
run: bun eslint --fix --max-warnings 0 "{staged_files}"
1111
stage_fixed: true

oxfmt.config.ts

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

oxlint.config.ts

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

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
"dev": "next dev -p 3000",
2424
"email:dev": "email dev --port 3001 --dir ./src/emails/templates",
2525
"email:export": "email export --dir ./src/emails/templates",
26-
"format": "oxfmt",
27-
"format:check": "oxfmt --check",
26+
"format": "prettier --write .",
27+
"format:check": "prettier --check .",
2828
"knip": "knip-bun",
29-
"lint": "oxlint",
30-
"lint:fix": "oxlint --fix",
29+
"lint": "eslint",
30+
"lint:fix": "eslint --fix",
3131
"lint:spell": "cspell .",
3232
"prepare": "lefthook install",
3333
"start": "next start -p 3000",
@@ -124,8 +124,8 @@
124124
"@cspell/dict-es-es": "3.0.8",
125125
"@cspell/dict-pt-br": "2.4.2",
126126
"@lingual/i18n-check": "0.9.3",
127-
"@nelsonlaidev/oxfmt-config": "0.1.0",
128-
"@nelsonlaidev/oxlint-config": "0.1.0",
127+
"@nelsonlaidev/eslint-config": "4.0.0",
128+
"@nelsonlaidev/prettier-config": "0.2.1",
129129
"@nelsonlaidev/typescript-config": "1.2.1",
130130
"@playwright/test": "1.58.2",
131131
"@react-email/preview-server": "5.2.10",
@@ -149,14 +149,13 @@
149149
"cspell": "9.7.0",
150150
"discord-api-types": "0.38.42",
151151
"drizzle-kit": "0.31.10",
152+
"eslint": "10.1.0",
152153
"execa": "9.6.1",
153154
"jsdom": "29.0.1",
154155
"knip": "6.0.6",
155156
"lefthook": "2.1.4",
156-
"oxfmt": "0.42.0",
157-
"oxlint": "1.57.0",
158-
"oxlint-tsgolint": "0.18.0",
159157
"postcss-load-config": "6.0.1",
158+
"prettier": "3.8.1",
160159
"react-cosmos": "7.2.0",
161160
"react-cosmos-core": "7.2.0",
162161
"react-cosmos-next": "7.2.0",
@@ -167,8 +166,8 @@
167166
"typescript": "6.0.2",
168167
"vitest": "4.1.2"
169168
},
169+
"packageManager": "bun@1.3.11",
170170
"engines": {
171171
"node": ">=24"
172-
},
173-
"packageManager": "bun@1.3.11"
172+
}
174173
}

0 commit comments

Comments
 (0)