chore: update linting script for next.js 16

This commit is contained in:
2025-12-11 19:16:24 -05:00
parent 5c9d564c6d
commit 962f2ad7ee
4 changed files with 47 additions and 52 deletions

View File

@@ -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;

44
eslint.config.js Normal file
View File

@@ -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,
},
},
},
);

View File

@@ -6,14 +6,13 @@
"scripts": { "scripts": {
"build": "next build", "build": "next build",
"dev": "next dev", "dev": "next dev",
"lint": "next lint", "lint": "eslint .",
"lint:fix": "next lint --fix", "lint:fix": "eslint . --fix",
"preview": "next build && next start", "preview": "next build && next start",
"start": "next start", "start": "next start",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache", "format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache", "format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache"
"update-pdfs": "bun scripts/update-pdfs.js"
}, },
"dependencies": { "dependencies": {
"@mdx-js/loader": "^3.1.1", "@mdx-js/loader": "^3.1.1",

View File

@@ -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"
}