diff --git a/drizzle.config.ts b/drizzle.config.ts deleted file mode 100644 index 33b6656..0000000 --- a/drizzle.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { type Config } from "drizzle-kit"; - -import { env } from "~/env"; - -export default { - schema: "./src/server/db/schema.ts", - dialect: "postgresql", - dbCredentials: { - url: env.DATABASE_URL, - }, - // tablesFilter: ["hristudio_*"], -} satisfies Config; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..7b4837c --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,44 @@ +import nextCoreWebVitals from "eslint-config-next/core-web-vitals"; +import tseslint from "typescript-eslint"; + +export default tseslint.config( + { + ignores: [".next"], + }, + ...nextCoreWebVitals, + { + files: ["**/*.ts", "**/*.tsx"], + extends: [ + ...tseslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + ...tseslint.configs.stylisticTypeChecked, + ], + rules: { + "@typescript-eslint/array-type": "off", + "@typescript-eslint/consistent-type-definitions": "off", + "@typescript-eslint/consistent-type-imports": [ + "warn", + { prefer: "type-imports", fixStyle: "inline-type-imports" }, + ], + "@typescript-eslint/no-unused-vars": [ + "warn", + { argsIgnorePattern: "^_" }, + ], + "@typescript-eslint/require-await": "off", + "@typescript-eslint/no-misused-promises": [ + "error", + { checksVoidReturn: { attributes: false } }, + ], + }, + }, + { + linterOptions: { + reportUnusedDisableDirectives: true, + }, + languageOptions: { + parserOptions: { + projectService: true, + }, + }, + }, +); diff --git a/package.json b/package.json index 7f9bdb6..0ae9cd0 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,13 @@ "scripts": { "build": "next build", "dev": "next dev", - "lint": "next lint", - "lint:fix": "next lint --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "preview": "next build && next start", "start": "next start", "typecheck": "tsc --noEmit", "format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache", - "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache", - "update-pdfs": "bun scripts/update-pdfs.js" + "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache" }, "dependencies": { "@mdx-js/loader": "^3.1.1", diff --git a/vercel.json b/vercel.json deleted file mode 100644 index a283794..0000000 --- a/vercel.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "buildCommand": "bun run build", - "installCommand": "bun install", - "functions": { - "src/app/api/**/*.ts": { - "maxDuration": 30 - } - }, - "headers": [ - { - "source": "/publications/(.*)\\.pdf", - "headers": [ - { - "key": "Cache-Control", - "value": "public, max-age=86400, s-maxage=86400" - }, - { - "key": "Content-Type", - "value": "application/pdf" - }, - { - "key": "Content-Disposition", - "value": "inline" - } - ] - } - ], - "rewrites": [ - { - "source": "/api/publications/:filename", - "destination": "/publications/:filename" - } - ], - - "framework": "nextjs" -}