Skip to content

Commit 48c4c64

Browse files
committed
lint
Signed-off-by: walnuts1018 <walnuts1018@hatena.com>
1 parent ec4176b commit 48c4c64

35 files changed

+3207
-1565
lines changed

eslint.config.mjs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
4-
5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = dirname(__filename);
7-
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
});
11-
12-
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
14-
];
15-
16-
export default eslintConfig;
1+
import hatenaconfig from "@hatena/eslint-config-hatena/flat";
2+
export default hatenaconfig(
3+
{
4+
next: "strict",
5+
},
6+
[
7+
{
8+
rules: {
9+
"no-console": 0, // TODO: remove
10+
"@typescript-eslint/no-misused-promises": 0,
11+
},
12+
},
13+
]
14+
);

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
"dev": "next dev --turbopack",
77
"build": "next build && next-sitemap --config next-sitemap.config.js",
88
"start": "next start",
9-
"lint": "next lint",
10-
"lint:fix": "next lint --fix"
9+
"lint:eslint": "next lint",
10+
"lint:eslint:fix": "next lint --fix",
11+
"lint:prettier": "prettier --check .",
12+
"lint:prettier:fix": "prettier --write ."
1113
},
1214
"dependencies": {
1315
"@opentelemetry/api-logs": "^0.201.1",
@@ -31,6 +33,7 @@
3133
"@eslint/compat": "^1.2.9",
3234
"@eslint/eslintrc": "^3.3.1",
3335
"@eslint/js": "^9.27.0",
36+
"@hatena/eslint-config-hatena": "github:hatena/eslint-config-hatena#v3.3.0",
3437
"@next/bundle-analyzer": "^15.3.2",
3538
"@tailwindcss/postcss": "^4.1.7",
3639
"@types/body-scroll-lock": "^3.1.2",
@@ -46,6 +49,7 @@
4649
"eslint-plugin-unused-imports": "^4.1.4",
4750
"globals": "^16.1.0",
4851
"next-sitemap": "^4.2.3",
52+
"prettier-plugin-tailwindcss": "^0.6.11",
4953
"react-schemaorg": "^2.0.0",
5054
"schema-dts": "^1.1.5",
5155
"sharp": "^0.34.2",

0 commit comments

Comments
 (0)