-
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?
Conversation
import { ReactNode } from 'react'; | ||
import type { ReactNode } from 'react'; |
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
declare module globalThis { | ||
declare namespace globalThis { |
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 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the ESLint disable for database function name auth
import type { NextConfig } from 'next'; | ||
|
||
const nextConfig: NextConfig = { | ||
experimental: { | ||
dynamicIO: true, | ||
typedRoutes: true, | ||
}, | ||
eslint: { | ||
ignoreDuringBuilds: true, | ||
}, | ||
typescript: { | ||
ignoreBuildErrors: true, | ||
}, | ||
}; | ||
|
||
export default nextConfig; |
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.
Use the latest next. config setting
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Make codegen use type-only
import for types
We added this
import u from 'eslint-config-upleveled';const c=u.filter(d=>d.name!=='upleveled:database-auth');export default c;
to theeslint.config.js
file to disable the linting of the database query names as we were not adding a real session token to the GraphQL lecture but now we are using real authentication so we should allow this rule again so we can be guided on how we write authenticated and unauthenticated database query function names.Update the packages and fix the type imports to respect the latest ESLint config checks