Fix pre-commit script to properly handle multiple files and resolve ESLint warnings
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
import { authService } from './auth/auth.service';
|
||||
import { OAuthProvider, OAuthState, User } from '../types';
|
||||
import { dbService } from './couchdb.factory';
|
||||
import { AccountStatus } from './auth/auth.constants';
|
||||
|
||||
// Mock OAuth configuration
|
||||
const GOOGLE_CLIENT_ID = 'mock_google_client_id';
|
||||
@@ -12,8 +9,6 @@ const GOOGLE_AUTH_URL = 'https://accounts.google.com/o/oauth2/v2/auth';
|
||||
const GITHUB_AUTH_URL = 'https://github.com/login/oauth/authorize';
|
||||
|
||||
// Mock token exchange endpoints
|
||||
const GOOGLE_TOKEN_URL = 'https://oauth2.googleapis.com/token';
|
||||
const GITHUB_TOKEN_URL = 'https://github.com/login/oauth/access_token';
|
||||
|
||||
// Mock OAuth scopes
|
||||
const GOOGLE_SCOPES = 'openid email profile';
|
||||
@@ -60,7 +55,7 @@ export const githubAuth = () => {
|
||||
// Mock token exchange
|
||||
const mockExchangeCodeForToken = async (
|
||||
provider: 'google' | 'github',
|
||||
code: string
|
||||
_code: string
|
||||
): Promise<string> => {
|
||||
// In a real implementation, we would make a POST request to the token endpoint
|
||||
// with the code, client_id, client_secret, and redirect_uri
|
||||
@@ -72,7 +67,7 @@ const mockExchangeCodeForToken = async (
|
||||
// Mock user info retrieval
|
||||
const mockGetUserInfo = async (
|
||||
provider: 'google' | 'github',
|
||||
accessToken: string
|
||||
_accessToken: string
|
||||
): Promise<{ email: string; name: string }> => {
|
||||
// In a real implementation, we would make a GET request to the user info endpoint
|
||||
// with the access token
|
||||
|
||||
Reference in New Issue
Block a user