mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-25 05:21:03 -07:00
chore(lint): enforce zero warnings and cleanup syntax restrictions (#22902)
This commit is contained in:
@@ -42,6 +42,7 @@ describe('IdeIntegrationNudge', () => {
|
||||
beforeEach(() => {
|
||||
vi.mocked(debugLogger.warn).mockImplementation((...args) => {
|
||||
if (
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
typeof args[0] === 'string' &&
|
||||
/was not wrapped in act/.test(args[0])
|
||||
) {
|
||||
|
||||
@@ -42,6 +42,7 @@ describe('AuthInProgress', () => {
|
||||
vi.useFakeTimers();
|
||||
vi.mocked(debugLogger.error).mockImplementation((...args) => {
|
||||
if (
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
typeof args[0] === 'string' &&
|
||||
args[0].includes('was not wrapped in act')
|
||||
) {
|
||||
|
||||
@@ -505,7 +505,9 @@ export const useSlashCommandProcessor = (
|
||||
const props = result.props as Record<string, unknown>;
|
||||
if (
|
||||
!props ||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
typeof props['name'] !== 'string' ||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
typeof props['displayName'] !== 'string' ||
|
||||
!props['definition']
|
||||
) {
|
||||
|
||||
@@ -514,6 +514,7 @@ describe('textUtils', () => {
|
||||
const b = sanitized.b as { c: string; d: Array<string | object> };
|
||||
expect(b.c).toBe('\\u001b[32mgreen\\u001b[0m');
|
||||
expect(b.d[0]).toBe('\\u001b[33myellow\\u001b[0m');
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
if (typeof b.d[1] === 'object' && b.d[1] !== null) {
|
||||
const e = b.d[1] as { e: string };
|
||||
expect(e.e).toBe('\\u001b[34mblue\\u001b[0m');
|
||||
|
||||
Reference in New Issue
Block a user