mirror of
				https://github.com/theoludwig/theoludwig.git
				synced 2025-11-01 00:18:43 +01: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", | ||||
|   | ||||
| @@ -1,54 +0,0 @@ | ||||
| import { FlatCompat } from "@eslint/eslintrc" | ||||
| import typescriptESLint from "typescript-eslint" | ||||
| import config from "../eslint.config.js" | ||||
|  | ||||
| const flatCompat = new FlatCompat({ | ||||
|   baseDirectory: import.meta.dirname, | ||||
| }) | ||||
|  | ||||
| export default typescriptESLint.config( | ||||
|   ...config, | ||||
|   ...flatCompat.extends("next/core-web-vitals"), | ||||
|   { | ||||
|     name: "config-eslint/nextjs", | ||||
|     settings: { | ||||
|       react: { | ||||
|         version: "detect", | ||||
|       }, | ||||
|     }, | ||||
|     rules: { | ||||
|       "@next/next/no-html-link-for-pages": "off", | ||||
|       "@next/next/no-img-element": "off", | ||||
|       "react/self-closing-comp": [ | ||||
|         "error", | ||||
|         { | ||||
|           component: true, | ||||
|           html: true, | ||||
|         }, | ||||
|       ], | ||||
|       "react/void-dom-elements-no-children": "error", | ||||
|       "react/jsx-boolean-value": "error", | ||||
|       "no-restricted-imports": [ | ||||
|         "error", | ||||
|         { | ||||
|           paths: [ | ||||
|             { | ||||
|               name: "next/link", | ||||
|               message: "Please import from `@repo/i18n/routing` instead.", | ||||
|             }, | ||||
|             { | ||||
|               name: "next/navigation", | ||||
|               importNames: [ | ||||
|                 "redirect", | ||||
|                 "permanentRedirect", | ||||
|                 "useRouter", | ||||
|                 "usePathname", | ||||
|               ], | ||||
|               message: "Please import from `@repo/i18n/routing` instead.", | ||||
|             }, | ||||
|           ], | ||||
|         }, | ||||
|       ], | ||||
|     }, | ||||
|   }, | ||||
| ) | ||||
| @@ -9,23 +9,18 @@ | ||||
|       "import": "./eslint.config.js", | ||||
|       "require": "./eslint.config.js", | ||||
|       "default": "./eslint.config.js" | ||||
|     }, | ||||
|     "./nextjs": { | ||||
|       "types": "./index.d.ts", | ||||
|       "import": "./nextjs/eslint.config.js", | ||||
|       "require": "./nextjs/eslint.config.js", | ||||
|       "default": "./nextjs/eslint.config.js" | ||||
|     } | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@eslint/eslintrc": "catalog:", | ||||
|     "typescript-eslint": "catalog:", | ||||
|     "eslint": "catalog:", | ||||
|     "eslint-config-conventions": "catalog:", | ||||
|     "eslint-plugin-promise": "catalog:", | ||||
|     "eslint-plugin-unicorn": "catalog:", | ||||
|     "eslint-config-next": "catalog:", | ||||
|     "eslint-plugin-import-x": "catalog:", | ||||
|     "@next/eslint-plugin-next": "catalog:", | ||||
|     "eslint-plugin-react": "catalog:", | ||||
|     "eslint-plugin-react-hooks": "catalog:", | ||||
|     "typescript": "catalog:", | ||||
|     "globals": "catalog:" | ||||
|   } | ||||
|   | ||||
| @@ -19,7 +19,7 @@ | ||||
|     "allowImportingTsExtensions": true, | ||||
|     "skipLibCheck": true, | ||||
|     "jsx": "preserve", | ||||
|     "incremental": true, | ||||
|     "incremental": false, | ||||
|     "noEmit": true, | ||||
|  | ||||
|     "target": "ESNext", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user