mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-09-11 23:09:22 +02:00
chore: clean up
This commit is contained in:
@@ -1,25 +1,75 @@
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
import nextPlugin from "@next/eslint-plugin-next"
|
||||
import configConventions from "eslint-config-conventions"
|
||||
import importX from "eslint-plugin-import-x"
|
||||
import importXPlugin from "eslint-plugin-import-x"
|
||||
import reactPlugin from "eslint-plugin-react"
|
||||
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
|
||||
export default typescriptESLint.config(
|
||||
...configConventions,
|
||||
reactHooksPlugin.configs.recommended,
|
||||
reactPlugin.configs.flat.recommended,
|
||||
{
|
||||
ignores: [
|
||||
".next",
|
||||
"**/next.config.js",
|
||||
"**/next.config.ts",
|
||||
"**/eslint.config.js",
|
||||
"**/tailwind.config.js",
|
||||
"**/postcss.config.js",
|
||||
"**/kysely.config.ts",
|
||||
],
|
||||
},
|
||||
...configConventions,
|
||||
{
|
||||
name: "config-eslint",
|
||||
settings: {
|
||||
react: {
|
||||
version: "19.1.1",
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
"import-x": importX,
|
||||
"@next/next": nextPlugin,
|
||||
"import-x": importXPlugin,
|
||||
},
|
||||
rules: {
|
||||
...nextPlugin.configs.recommended.rules,
|
||||
...nextPlugin.configs["core-web-vitals"].rules,
|
||||
"@next/next/no-html-link-for-pages": "off",
|
||||
"@next/next/no-img-element": "off",
|
||||
|
||||
"react-hooks/react-compiler": "error",
|
||||
|
||||
"react/jsx-no-target-blank": "off",
|
||||
"react/no-unknown-property": "off",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/prop-types": "off",
|
||||
"react/self-closing-comp": [
|
||||
"error",
|
||||
{
|
||||
component: true,
|
||||
html: true,
|
||||
},
|
||||
],
|
||||
"react/void-dom-elements-no-children": "error",
|
||||
"react/jsx-boolean-value": "error",
|
||||
"react/iframe-missing-sandbox": "off",
|
||||
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
paths: [
|
||||
{
|
||||
name: "next/navigation",
|
||||
importNames: [
|
||||
"redirect",
|
||||
"permanentRedirect",
|
||||
"useRouter",
|
||||
"usePathname",
|
||||
],
|
||||
message: "Please import from `@repo/i18n/routing` instead.",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"import-x/extensions": [
|
||||
"error",
|
||||
"ignorePackages",
|
||||
|
Reference in New Issue
Block a user