mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-10 21:30:40 -07:00
Disallow and suppress unsafe assignment (#19736)
This commit is contained in:
committed by
GitHub
parent
b746524a1b
commit
58d637f919
@@ -243,6 +243,7 @@ export const TableRenderer: React.FC<TableRendererProps> = ({
|
||||
isHeader = false,
|
||||
): React.ReactNode => {
|
||||
const renderedCells = cells.map((cell, index) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const width = adjustedWidths[index] || 0;
|
||||
return renderCell(cell, width, isHeader);
|
||||
});
|
||||
|
||||
@@ -179,6 +179,7 @@ async function configureVSCodeStyle(
|
||||
await backupFile(keybindingsFile);
|
||||
try {
|
||||
const cleanContent = stripJsonComments(content);
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const parsedContent = JSON.parse(cleanContent);
|
||||
if (!Array.isArray(parsedContent)) {
|
||||
return {
|
||||
|
||||
@@ -233,7 +233,9 @@ export function escapeAnsiCtrlCodes<T>(obj: T): T {
|
||||
let newArr: unknown[] | null = null;
|
||||
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const value = obj[i];
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const escapedValue = escapeAnsiCtrlCodes(value);
|
||||
if (escapedValue !== value) {
|
||||
if (newArr === null) {
|
||||
|
||||
Reference in New Issue
Block a user