Skip to content

Commit

Permalink
Update ESLint and Prettier versions with configuration adjustments (#14)
Browse files Browse the repository at this point in the history
* ⬆️ eslintとprettierのバージョンを更新し、ESLint設定を修正

* 🔨 ESlintの設定を更新
  • Loading branch information
yuito-it authored Jan 26, 2025
1 parent c22dc47 commit a96c68f
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 281 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
greet:
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
26 changes: 14 additions & 12 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
import { FlatCompat } from '@eslint/eslintrc';
import { fixupConfigRules } from '@eslint/compat';
import prettier from 'eslint-config-prettier';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const flatCompat = new FlatCompat();

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
/**
* @type {import("eslint").Linter.Config}
*/
const config = [
...fixupConfigRules(
flatCompat.extends('next/core-web-vitals'),
flatCompat.extends('next/typescript'),
),
prettier,
];

export default eslintConfig;
export default config;
Loading

0 comments on commit a96c68f

Please sign in to comment.