Skip to content

Commit a96c68f

Browse files
author
Yuito Akatsuki (Tani Yutaka)
authored
Update ESLint and Prettier versions with configuration adjustments (#14)
* ⬆️ eslintとprettierのバージョンを更新し、ESLint設定を修正 * 🔨 ESlintの設定を更新
1 parent c22dc47 commit a96c68f

File tree

4 files changed

+220
-281
lines changed

4 files changed

+220
-281
lines changed

.github/workflows/Lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1313
jobs:
1414
# This workflow contains a single job called "greet"
15-
greet:
15+
lint:
1616
# The type of runner that the job will run on
1717
runs-on: ubuntu-latest
1818

eslint.config.mjs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
1+
import { FlatCompat } from '@eslint/eslintrc';
2+
import { fixupConfigRules } from '@eslint/compat';
3+
import prettier from 'eslint-config-prettier';
44

5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = dirname(__filename);
5+
const flatCompat = new FlatCompat();
76

8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
});
11-
12-
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
7+
/**
8+
* @type {import("eslint").Linter.Config}
9+
*/
10+
const config = [
11+
...fixupConfigRules(
12+
flatCompat.extends('next/core-web-vitals'),
13+
flatCompat.extends('next/typescript'),
14+
),
15+
prettier,
1416
];
1517

16-
export default eslintConfig;
18+
export default config;

0 commit comments

Comments
 (0)