Skip to content

Instantly share code, notes, and snippets.

@rbika
Created May 17, 2025 20:10
Show Gist options
  • Select an option

  • Save rbika/9b133e9c88431bad55f8d5e56daa1f59 to your computer and use it in GitHub Desktop.

Select an option

Save rbika/9b133e9c88431bad55f8d5e56daa1f59 to your computer and use it in GitHub Desktop.
ESLint config - Nextjs
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
import prettier from "eslint-config-prettier";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
});
const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
prettier
];
export default eslintConfig;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment