Skip to content

Commit 60139f5

Browse files
authored
refactoring & use oxfmt instead of prettier (#17)
* typo fix * go-connectを修正&二間トビと大ゲイマを追加 * 目盛りや星の明度を調整 * fix コスミ connection * npm audit fix * update dependencies * npm update * `next lint`からESLint CLIに移行 https://nextjsjp.org/docs/app/guides/upgrading/codemods#next-lintからeslint-cliへ移行 * add Next.js mcp server * upgrade Next.js to the latest * fix eslint config * replace Prettier with oxfmt * add eslint mcp server * fix ci
1 parent c8b6943 commit 60139f5

File tree

14 files changed

+2061
-1180
lines changed

14 files changed

+2061
-1180
lines changed

.github/workflows/lintcheck.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
node-version: 20
1212
cache: 'npm'
1313
- run: npm ci
14-
- run: npx prettier . --check
14+
- run: npx oxfmt --check
1515
- run: npm run lint

.oxfmtrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"trailingComma": "none",
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"experimentalSortPackageJson": false,
7+
"ignorePatterns": []
8+
}

.prettierrc

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

.vscode/extensions.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"recommendations": [
33
"dbaeumer.vscode-eslint",
44
"bradlc.vscode-tailwindcss",
5-
"esbenp.prettier-vscode"
6-
]
5+
"oxc.oxc-vscode"
6+
],
7+
"unwantedRecommendations": ["esbenp.prettier-vscode"]
78
}

.vscode/mcp.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"servers": {
3+
"io.github.vercel/next-devtools-mcp": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": ["-y", "next-devtools-mcp@latest"]
7+
},
8+
"ESLint": {
9+
"type": "stdio",
10+
"command": "npx",
11+
"args": ["@eslint/mcp@latest"]
12+
}
13+
},
14+
"inputs": []
15+
}

.vscode/settings.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"[typescript][typescriptreact][json][jsonc]": {
3-
"editor.defaultFormatter": "esbenp.prettier-vscode"
3+
"editor.defaultFormatter": "oxc.oxc-vscode"
44
},
55
"files.insertFinalNewline": true,
66
"files.trimFinalNewlines": true,
7-
"prettier.enable": true,
8-
"typescript.tsdk": "node_modules/typescript/lib"
7+
"editor.formatOnSave": true,
8+
"editor.formatOnSaveMode": "file",
9+
"typescript.tsdk": "node_modules/typescript/lib",
10+
11+
"chat.mcp.gallery.enabled": true
912
}

eslint.config.mjs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
import { FlatCompat } from '@eslint/eslintrc';
1+
import { defineConfig, globalIgnores } from 'eslint/config';
2+
import nextVitals from 'eslint-config-next/core-web-vitals';
3+
import typescript from 'eslint-config-next/typescript';
4+
import prettier from 'eslint-config-prettier';
25

3-
const compat = new FlatCompat({
4-
baseDirectory: import.meta.dirname
5-
});
6-
7-
const eslintConfig = [
8-
...compat.config({
9-
extends: ['next/core-web-vitals', 'next/typescript', 'prettier']
10-
})
11-
];
6+
const eslintConfig = defineConfig([
7+
...nextVitals,
8+
...typescript,
9+
prettier,
10+
// eslint-config-nextのデフォルト無視設定をオーバーライドします。
11+
globalIgnores([
12+
'node_modules/**',
13+
'.next/**',
14+
'out/**',
15+
'build/**',
16+
'next-env.d.ts'
17+
])
18+
]);
1219

1320
export default eslintConfig;

0 commit comments

Comments
 (0)