Skip to content
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

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

Eprince-hub
Copy link
Member

We added this import u from 'eslint-config-upleveled';const c=u.filter(d=>d.name!=='upleveled:database-auth');export default c; to the eslint.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

@Eprince-hub Eprince-hub self-assigned this Oct 17, 2024
import { ReactNode } from 'react';
import type { ReactNode } from 'react';
Copy link
Member Author

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 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module is now called namespace
Screenshot 2024-10-17 at 14 26 22

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';
Copy link
Member Author

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

Comment on lines +1 to +16
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
experimental: {
dynamicIO: true,
typedRoutes: true,
},
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
};

export default nextConfig;
Copy link
Member Author

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,
Copy link
Member Author

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

@Eprince-hub Eprince-hub changed the base branch from main to next October 17, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant