hataları düzelt:
nexus@pop-os:~/Masaüstü/HistoryGPT$ npx eslint . --ext .ts,.tsx

/home/nexus/Masaüstü/HistoryGPT/App.tsx
   41:19  error    'state' is missing in props validation                                                                  react/prop-types
   41:26  error    'descriptors' is missing in props validation                                                            react/prop-types
   41:39  error    'navigation' is missing in props validation                                                             react/prop-types
   64:14  error    'state.routes' is missing in props validation                                                           react/prop-types
   64:21  error    'state.routes.map' is missing in props validation                                                       react/prop-types
   73:33  error    'state.index' is missing in props validation                                                            react/prop-types
   76:36  error    'navigation.emit' is missing in props validation                                                        react/prop-types
   83:24  error    'navigation.navigate' is missing in props validation                                                    react/prop-types
  107:50  error    Inline style: { color: "isFocused ? '#007AFF' : '#8E8E93'" }                                            react-native/no-inline-styles
  107:50  error    Color literal: { color: "isFocused ? '#007AFF' : '#8E8E93'" }                                           react-native/no-color-literals
  119:19  error    Whitespace(s) cannot be used outside of a <Text> tag                                                    react-native/no-raw-text
  150:39  warning  'route' is defined but never used                                                                       @typescript-eslint/no-unused-vars
  172:17  error    Color literal: { backgroundColor: '#F8F8F8', borderTopColor: '#E0E0E0' }                                react-native/no-color-literals
  174:5   error    Expected style properties to be in ascending order. 'backgroundColor' should be before 'flexDirection'  react-native/sort-styles
  182:5   error    Expected style properties to be in ascending order. 'alignItems' should be before 'flex'                react-native/sort-styles
  188:5   error    Expected style properties to be in ascending order. 'fontFamily' should be before 'marginTop'           react-native/sort-styles

// App.tsx

import React from 'react';
import { NavigationContainer, CommonActions } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { View, StyleSheet, Platform, TouchableOpacity, Keyboard } from 'react-native';
import HomeScreen from './src/screens/HomeScreen';
import ChatListScreen from './src/screens/ChatListScreen';
import ChatScreen from './src/screens/ChatScreen';
import { Ionicons } from '@expo/vector-icons';
import CustomText from './src/components/CustomText';
import { ChatProvider } from './src/context/ChatContext'; // Import ChatProvider

const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();

const ChatStack = () => (
  <Stack.Navigator
    initialRouteName="ChatList"
    screenOptions={{
      headerShown: false,
    }}
  >
    <Stack.Screen name="ChatList" component={ChatListScreen} />
    <Stack.Screen name="Chat" component={ChatScreen} />
  </Stack.Navigator>
);

const FiguresStack = () => (
  <Stack.Navigator
    initialRouteName="Home"
    screenOptions={{
      headerShown: false,
    }}
  >
    <Stack.Screen name="Home" component={HomeScreen} />
  </Stack.Navigator>
);

const TabBar = ({ state, descriptors, navigation }) => {
  const [isKeyboardVisible, setKeyboardVisible] = React.useState(false);

  React.useEffect(() => {
    const showSubscription = Keyboard.addListener('keyboardDidShow', () => {
      setKeyboardVisible(true);
    });
    const hideSubscription = Keyboard.addListener('keyboardDidHide', () => {
      setKeyboardVisible(false);
    });

    return () => {
      showSubscription.remove();
      hideSubscription.remove();
    };
  }, []);

  if (isKeyboardVisible) {
    return null; // Hide the TabBar when the keyboard is visible
  }

  return (
    <View style={styles.tabContainer}>
      {state.routes.map((route, index) => {
        const { options } = descriptors[route.key];
        const label =
          options.tabBarLabel !== undefined
            ? options.tabBarLabel
            : options.title !== undefined
            ? options.title
            : route.name;

        const isFocused = state.index === index;

        const onPress = () => {
          const event = navigation.emit({
            type: 'tabPress',
            target: route.key,
            canPreventDefault: true,
          });

          if (!isFocused && !event.defaultPrevented) {
            navigation.navigate(route.name);
          }
        };

        // Render the icon directly without extracting 'name'
        const icon = options.tabBarIcon
          ? options.tabBarIcon({
              focused: isFocused,
              color: isFocused ? '#007AFF' : '#8E8E93',
              size: 24,
            })
          : null;

        return (
          <TouchableOpacity
            key={route.key}
            accessibilityRole="button"
            accessibilityState={isFocused ? { selected: true } : {}}
            accessibilityLabel={options.tabBarAccessibilityLabel}
            testID={options.tabBarTestID}
            onPress={onPress}
            style={styles.tabItem}
          >
            {icon}
            <CustomText style={[styles.tabLabel, { color: isFocused ? '#007AFF' : '#8E8E93' }]}>
              {label}
            </CustomText>
          </TouchableOpacity>
        );
      })}
    </View>
  );
};

const App = () => {
  return (
    <ChatProvider> {/* Wrap NavigationContainer with ChatProvider */}
      <NavigationContainer>
        <Tab.Navigator
          initialRouteName="Figures"
          tabBar={(props) => <TabBar {...props} />}
          screenOptions={({ route }) => ({
            headerShown: false,
            tabBarIcon: ({ focused, color, size }) => {
              let iconName = '';
              if (route.name === 'Figures') {
                iconName = focused ? 'people' : 'people-outline';
              } else if (route.name === 'Chats') {
                iconName = focused ? 'chatbubbles' : 'chatbubbles-outline';
              }
              return <Ionicons name={iconName} size={size} color={color} />;
            },
          })}
        >
          <Tab.Screen
            name="Figures"
            component={FiguresStack}
            options={{
              tabBarLabel: 'Karakterler',
            }}
          />
          <Tab.Screen
            name="Chats"
            component={ChatStack}
            options={{
              tabBarLabel: 'Sohbetler',
            }}
            listeners={({ navigation, route }) => ({
              tabPress: e => {
                // Prevent default behavior
                e.preventDefault();

                // Reset the navigation stack to ChatList
                navigation.dispatch(
                  CommonActions.reset({
                    index: 0,
                    routes: [{ name: 'Chats', state: { routes: [{ name: 'ChatList' }] } }],
                  })
                );
              },
            })}
          />
        </Tab.Navigator>
      </NavigationContainer>
    </ChatProvider>
  );
};

const styles = StyleSheet.create({
  tabContainer: {
    flexDirection: 'row',
    backgroundColor: '#F8F8F8',
    borderTopWidth: 1,
    borderTopColor: '#E0E0E0',
    paddingBottom: Platform.OS === 'ios' ? 20 : 10,
    paddingTop: 10,
  },
  tabItem: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  tabLabel: {
    fontSize: 12,
    marginTop: 3,
    fontFamily: 'Poppins_400Regular',
  },
});

export default App;

/home/nexus/Masaüstü/HistoryGPT/src/components/MessageItem.tsx
   4:46  warning  'Alert' is defined but never used                                                                      @typescript-eslint/no-unused-vars
  13:49  error    Component definition is missing display name                                                           react/display-name
  13:57  error    'message' is missing in props validation                                                               react/prop-types
  13:66  error    'onLongPress' is missing in props validation                                                           react/prop-types
  18:17  error    'message.isUser' is missing in props validation                                                        react/prop-types
  26:19  error    'message.isUser' is missing in props validation                                                        react/prop-types
  34:30  error    'message.isUser' is missing in props validation                                                        react/prop-types
  46:20  error    'message.text' is missing in props validation                                                          react/prop-types
  56:5   error    Expected style properties to be in ascending order. 'flexDirection' should be before 'marginVertical'  react-native/sort-styles
  63:3   error    Expected class names to be in ascending order. 'assistantContainer' should be before 'userContainer'   react-native/sort-styles
  71:5   error    Expected style properties to be in ascending order. 'borderRadius' should be before 'paddingVertical'  react-native/sort-styles
  73:15  error    Color literal: { backgroundColor: '#007AFF' }                                                          react-native/no-color-literals
  77:20  error    Color literal: { backgroundColor: '#E5E5EA' }                                                          react-native/no-color-literals
// src/components/MessageItem.tsx

import React, { memo } from 'react';
import { View, StyleSheet, TouchableOpacity, Alert } from 'react-native';
import { Message } from '../types/types';
import Markdown from 'react-native-markdown-display'; // Markdown desteği

interface MessageItemProps {
  message: Message;
  onLongPress?: () => void; // Uzun basma olayı için
}

const MessageItem: React.FC<MessageItemProps> = memo(({ message, onLongPress }) => {
  return (
    <View
      style={[
        styles.container,
        message.isUser ? styles.userContainer : styles.assistantContainer
      ]}
    >
      <TouchableOpacity 
        onLongPress={onLongPress}
        activeOpacity={0.7}
        style={[
          styles.messageBubble,
          message.isUser ? styles.userBubble : styles.assistantBubble
        ]}
      >
        <Markdown
          style={{
            body: {
              fontSize: 16,
              fontFamily: 'Poppins_400Regular', // Poppins font kullanımı
              color: message.isUser ? '#FFFFFF' : '#000000',
            },
            strong: {
              fontFamily: 'Poppins_700Bold',
            },
            em: {
              fontFamily: 'Poppins_400Regular',
              fontStyle: 'italic',
            },
            // Diğer Markdown stilleri gerektiğinde eklenebilir
          }}
        >
          {message.text}
        </Markdown>
      </TouchableOpacity>
    </View>
  );
});

const styles = StyleSheet.create({
  container: {
    marginVertical: 4, // Reduced vertical margin for closer message spacing
    flexDirection: 'row',
    alignItems: 'flex-end',
  },
  userContainer: {
    justifyContent: 'flex-end', // Align user messages to the right
    paddingLeft: 0, // Ensures space for avatar or to prevent overlap
  },
  assistantContainer: {
    justifyContent: 'flex-start', // Align assistant messages to the left
    paddingRight: 0, // Ensures space for avatar or to prevent overlap
  },
  messageBubble: {
    maxWidth: '87%',
    paddingHorizontal: 12,
    paddingVertical: 6, // Reduced vertical padding for tighter chat bubbles
    borderRadius: 16,
  },
  userBubble: {
    backgroundColor: '#007AFF',
    borderTopRightRadius: 0,
  },
  assistantBubble: {
    backgroundColor: '#E5E5EA',
    borderTopLeftRadius: 0,
  },
});

export default MessageItem;