-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable ESLint latest rules and database query name checks #3
base: next
Are you sure you want to change the base?
Changes from all commits
1549f5b
5cf1070
a88f90b
cb6214d
356dc0d
cf079c6
677ef46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { CodegenConfig } from '@graphql-codegen/cli'; | ||
import type { CodegenConfig } from '@graphql-codegen/cli'; | ||
|
||
const codegenConfig: CodegenConfig = { | ||
overwrite: true, | ||
|
@@ -11,6 +11,7 @@ const codegenConfig: CodegenConfig = { | |
|
||
config: { | ||
contextType: '../app/api/graphql/route#Context', | ||
useTypeImports: true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make codegen use |
||
}, | ||
}; | ||
export default codegenConfig; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import 'server-only'; | ||
import postgres, { Sql } from 'postgres'; | ||
import postgres, { type Sql } from 'postgres'; | ||
import { postgresConfig, setEnvironmentVariables } from '../util/config'; | ||
|
||
// This loads all environment variables from a .env file | ||
// for all code after this line | ||
setEnvironmentVariables(); | ||
|
||
// Type needed for the connection function below | ||
declare module globalThis { | ||
declare namespace globalThis { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
let postgresSqlClient: Sql; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import u from 'eslint-config-upleveled';const c=u.filter(d=>d.name!=='upleveled:database-auth');export default c; | ||
export { default } from 'eslint-config-upleveled'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the ESLint disable for database function name auth |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Sql } from 'postgres'; | ||
import type { Sql } from 'postgres'; | ||
|
||
export type Animal = { | ||
id: number; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Sql } from 'postgres'; | ||
import type { Sql } from 'postgres'; | ||
|
||
const animals = [ | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Sql } from 'postgres'; | ||
import type { Sql } from 'postgres'; | ||
|
||
export type User = { | ||
id: number; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { Sql } from 'postgres'; | ||
import type { Sql } from 'postgres'; | ||
|
||
export type Session = { | ||
id: number; | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { NextConfig } from 'next'; | ||
|
||
const nextConfig: NextConfig = { | ||
experimental: { | ||
dynamicIO: true, | ||
typedRoutes: true, | ||
}, | ||
eslint: { | ||
ignoreDuringBuilds: true, | ||
}, | ||
typescript: { | ||
ignoreBuildErrors: true, | ||
}, | ||
}; | ||
|
||
export default nextConfig; | ||
Comment on lines
+1
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the latest next. config setting |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
"@apollo/experimental-nextjs-app-support": "^0.11.3", | ||
"@apollo/server": "^4.11.0", | ||
"@as-integrations/next": "^3.1.0", | ||
"@graphql-tools/schema": "^10.0.6", | ||
"@graphql-tools/schema": "^10.0.7", | ||
"@upleveled/ley": "^0.9.2", | ||
"bcrypt": "^5.1.1", | ||
"dotenv-safe": "^9.1.0", | ||
|
@@ -25,31 +25,31 @@ | |
"postgres": "^3.4.4", | ||
"react": "19.0.0-rc.0", | ||
"react-dom": "19.0.0-rc.0", | ||
"sass": "^1.79.4", | ||
"sass": "^1.80.1", | ||
"server-only": "^0.0.1", | ||
"tsx": "^4.19.1", | ||
"zod": "^3.23.8" | ||
}, | ||
"devDependencies": { | ||
"@graphql-codegen/cli": "^5.0.2", | ||
"@graphql-codegen/typescript": "^4.0.9", | ||
"@graphql-codegen/typescript-resolvers": "^4.2.1", | ||
"@graphql-codegen/cli": "^5.0.3", | ||
"@graphql-codegen/typescript": "^4.1.0", | ||
"@graphql-codegen/typescript-resolvers": "^4.3.0", | ||
"@parcel/watcher": "^2.4.1", | ||
"@ts-safeql/eslint-plugin": "^3.4.7", | ||
"@types/bcrypt": "^5.0.2", | ||
"@types/node": "^22.7.4", | ||
"@types/react": "^18.3.10", | ||
"@types/react-dom": "^18.3.0", | ||
"@types/node": "^22.7.6", | ||
"@types/react": "^18.3.11", | ||
"@types/react-dom": "^18.3.1", | ||
"concurrently": "^9.0.1", | ||
"eslint": "^9.11.1", | ||
"eslint-config-upleveled": "^8.7.1", | ||
"eslint": "^9.12.0", | ||
"eslint-config-upleveled": "^8.8.0", | ||
"libpg-query": "^16.2.0", | ||
"prettier": "^3.3.3", | ||
"prettier-plugin-embed": "^0.4.15", | ||
"prettier-plugin-sql": "^0.18.1", | ||
"stylelint": "^16.9.0", | ||
"stylelint-config-upleveled": "^1.1.4", | ||
"typescript": "^5.6.2" | ||
"stylelint": "^16.10.0", | ||
"stylelint-config-upleveled": "^1.1.5", | ||
"typescript": "^5.6.3" | ||
}, | ||
"packageManager": "[email protected]+sha512.ee7b93e0c2bd11409c6424f92b866f31d3ea1bef5fbe47d3c7500cdc3c9668833d2e55681ad66df5b640c61fa9dc25d546efa54d76d7f8bf54b13614ac293631" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import all types using type-only import