mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-24 04:52:43 -07:00
chore(lint): fix lint errors seen when running npm run lint (#19844)
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import type { Mock } from 'vitest';
|
||||
import { vi, describe, it, expect, beforeEach, type Mocked } from 'vitest';
|
||||
import type { Mock, Mocked } from 'vitest';
|
||||
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
||||
import * as fs from 'node:fs';
|
||||
import { EDIT_TOOL_NAME } from '../tools/tool-names.js';
|
||||
import type { BaseLlmClient } from '../core/baseLlmClient.js';
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import fsPromises from 'node:fs/promises';
|
||||
import * as nodePath from 'node:path';
|
||||
import * as os from 'node:os';
|
||||
import { getFolderStructure } from './getFolderStructure.js';
|
||||
import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
||||
@@ -251,7 +250,7 @@ ${testRootDir}${path.sep}
|
||||
|
||||
it('should ignore files and folders specified in .gitignore', async () => {
|
||||
await fsPromises.writeFile(
|
||||
nodePath.join(testRootDir, '.gitignore'),
|
||||
path.join(testRootDir, '.gitignore'),
|
||||
'ignored.txt\nnode_modules/\n.gemini/*\n!/.gemini/config.yaml',
|
||||
);
|
||||
await createTestFile('file1.txt');
|
||||
@@ -274,7 +273,7 @@ ${testRootDir}${path.sep}
|
||||
|
||||
it('should not ignore files if respectGitIgnore is false', async () => {
|
||||
await fsPromises.writeFile(
|
||||
nodePath.join(testRootDir, '.gitignore'),
|
||||
path.join(testRootDir, '.gitignore'),
|
||||
'ignored.txt',
|
||||
);
|
||||
await createTestFile('file1.txt');
|
||||
@@ -298,7 +297,7 @@ ${testRootDir}${path.sep}
|
||||
describe('with geminiignore', () => {
|
||||
it('should ignore geminiignore files by default', async () => {
|
||||
await fsPromises.writeFile(
|
||||
nodePath.join(testRootDir, GEMINI_IGNORE_FILE_NAME),
|
||||
path.join(testRootDir, GEMINI_IGNORE_FILE_NAME),
|
||||
'ignored.txt\nnode_modules/\n.gemini/\n!/.gemini/config.yaml',
|
||||
);
|
||||
await createTestFile('file1.txt');
|
||||
@@ -318,7 +317,7 @@ ${testRootDir}${path.sep}
|
||||
|
||||
it('should not ignore files if respectGeminiIgnore is false', async () => {
|
||||
await fsPromises.writeFile(
|
||||
nodePath.join(testRootDir, GEMINI_IGNORE_FILE_NAME),
|
||||
path.join(testRootDir, GEMINI_IGNORE_FILE_NAME),
|
||||
'ignored.txt\nnode_modules/\n.gemini/\n!/.gemini/config.yaml',
|
||||
);
|
||||
await createTestFile('file1.txt');
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
} from '../tools/memoryTool.js';
|
||||
import { flattenMemory } from '../config/memory.js';
|
||||
import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
||||
import { GEMINI_DIR, normalizePath } from './paths.js';
|
||||
import { GEMINI_DIR, normalizePath, homedir as pathsHomedir } from './paths.js';
|
||||
import type { HierarchicalMemory } from '../config/memory.js';
|
||||
|
||||
function flattenResult(result: {
|
||||
@@ -62,8 +62,6 @@ vi.mock('../utils/paths.js', async (importOriginal) => {
|
||||
};
|
||||
});
|
||||
|
||||
import { homedir as pathsHomedir } from './paths.js';
|
||||
|
||||
describe('memoryDiscovery', () => {
|
||||
const DEFAULT_FOLDER_TRUST = true;
|
||||
let testRootDir: string;
|
||||
|
||||
Reference in New Issue
Block a user