refactor: update ESLint configuration and remove unused dependencies

- Replaced Nuxt ESLint configuration with Antfu's ESLint config.
- Removed 'nuxt-visitors' module from Nuxt configuration.
- Added linting scripts to package.json for easier code quality checks.
- Introduced a new API endpoint for fetching weather data from OpenWeather.
- Enhanced chat types with new enums and properties for better state management.
- Added OpenWeather response types for improved type safety.
- Updated social links in types/index.ts to include an email contact.
This commit is contained in:
2025-09-02 17:45:01 +02:00
parent 05963bb605
commit 3fa4f574d3
22 changed files with 1032 additions and 279 deletions

View File

@@ -16,11 +16,31 @@ export enum ChatType {
STATS = 'stats',
ACTIVITY = 'activity',
RESUME = 'resume',
INIT = 'init',
}
export enum ChatState {
SENT = 'sent',
LOADING = 'loading',
}
export enum ChatSender {
USER = 'user',
ARTHUR = 'arthur',
}
export enum ChatFetchState {
THINKING = 'Thinking...',
FETCHING = 'Fetching the data...',
GENERATING = 'Generating the component...',
DONE = 'Done!',
}
export interface ChatMessage {
id: number
content: string
sender: string
content: string | null
sender: ChatSender
type: ChatType
state: ChatState
fetchStates?: ChatFetchState[]
}

View File

@@ -1,5 +1,6 @@
export * from './chat'
export * from './lanyard'
export * from './openweather'
export * from './time'
export * from './wakatime'
@@ -31,4 +32,5 @@ export const socials = [
{ icon: 'i-ph:github-logo-duotone', label: 'GitHub', to: 'https://github.com/ArthurDanjou' },
{ icon: 'i-ph:linkedin-logo-duotone', label: 'LinkedIn', to: 'https://www.linkedin.com/in/arthurdanjou/' },
{ icon: 'i-ph:discord-logo-duotone', label: 'Discord', to: 'https://discordapp.com/users/179635349100691456' },
{ icon: 'i-ph-envelope-duotone', label: 'Email', to: 'mailto:arthur.danjou@example.com' },
] as const

25
types/openweather.ts Normal file
View File

@@ -0,0 +1,25 @@
export interface OpenWeatherResponse {
name: string
main: {
temp: number
temp_min: number
temp_max: number
humidity: number
}
wind: {
speed: number
}
weather: {
description: string
}[]
};
export interface Weather {
location: string
temperature: number
temp_min: number
temp_max: number
humidity: number
wind: number
description: string
};