Created
May 17, 2025 10:29
-
-
Save barisbll/d1af00e0ed291365b2cbb7cfc52243ca to your computer and use it in GitHub Desktop.
Nextjs15 eslint.config
This file contains hidden or 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
import { dirname } from "path"; | |
import { fileURLToPath } from "url"; | |
import { FlatCompat } from "@eslint/eslintrc"; | |
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"), | |
{ | |
rules: { | |
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 1, maxBOF: 0 }], | |
"react/jsx-indent": ["error", 2], | |
"react/jsx-indent-props": ["error", 2], | |
"indent": ["error", 2, { "SwitchCase": 1 }], | |
"jsx-quotes": ["error", "prefer-double"], | |
"react/jsx-closing-bracket-location": ["error", "line-aligned"], | |
"react/jsx-closing-tag-location": "error", | |
"react/jsx-tag-spacing": ["error", { | |
"closingSlash": "never", | |
"beforeSelfClosing": "always", | |
"afterOpening": "never", | |
"beforeClosing": "never" | |
}] | |
}, | |
}, | |
]; | |
export default eslintConfig; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment