-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ESLint and Prettier versions with configuration adjustments (#14)
* ⬆️ eslintとprettierのバージョンを更新し、ESLint設定を修正 * 🔨 ESlintの設定を更新
- Loading branch information
Showing
4 changed files
with
220 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.