feat(01-01): add TypeScript interfaces and configure ESLint for Nuxt
- shared/types/index.ts with tightened Project, Technology, TechStack, Testimonial, FAQ interfaces - technologies, category, date now required on Project (was optional) - FAQ uses i18n keys (questionKey, answerKey, featuresKey) - Replace old eslint.config.ts with Nuxt-compatible eslint.config.mjs
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import withNuxt from './.nuxt/eslint.config.mjs'
|
||||
|
||||
export default withNuxt()
|
||||
@@ -1,22 +0,0 @@
|
||||
import { globalIgnores } from 'eslint/config'
|
||||
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
||||
import pluginVue from 'eslint-plugin-vue'
|
||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
||||
|
||||
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
|
||||
// import { configureVueProject } from '@vue/eslint-config-typescript'
|
||||
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
|
||||
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
|
||||
|
||||
export default defineConfigWithVueTs(
|
||||
{
|
||||
name: 'app/files-to-lint',
|
||||
files: ['**/*.{ts,mts,tsx,vue}'],
|
||||
},
|
||||
|
||||
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
||||
|
||||
pluginVue.configs['flat/essential'],
|
||||
vueTsConfigs.recommended,
|
||||
skipFormatting,
|
||||
)
|
||||
@@ -0,0 +1,59 @@
|
||||
export interface ProjectButton {
|
||||
title: string
|
||||
link: string
|
||||
}
|
||||
|
||||
export interface Project {
|
||||
id: string
|
||||
image: string
|
||||
technologies: string[]
|
||||
category: string
|
||||
date: string
|
||||
featured?: boolean
|
||||
buttons?: ProjectButton[]
|
||||
gallery?: string[]
|
||||
demoUrl?: string
|
||||
githubUrl?: string
|
||||
features?: string[]
|
||||
}
|
||||
|
||||
export interface Technology {
|
||||
name: string
|
||||
level: 'Beginner' | 'Intermediate' | 'Advanced'
|
||||
image: string
|
||||
}
|
||||
|
||||
export interface TechStack {
|
||||
programming: Technology[]
|
||||
front: Technology[]
|
||||
database: Technology[]
|
||||
devtools: Technology[]
|
||||
operating_systems: Technology[]
|
||||
socials: Technology[]
|
||||
}
|
||||
|
||||
export interface Testimonial {
|
||||
name: string
|
||||
role: string
|
||||
company: string
|
||||
avatar: string
|
||||
rating: number
|
||||
content: string
|
||||
date: string
|
||||
platform: string
|
||||
featured?: boolean
|
||||
project_type: string
|
||||
results?: string[]
|
||||
}
|
||||
|
||||
export interface TestimonialsStats {
|
||||
totalReviews: number
|
||||
averageRating: number
|
||||
projectsCompleted: number
|
||||
}
|
||||
|
||||
export interface FAQ {
|
||||
questionKey: string
|
||||
answerKey: string
|
||||
featuresKey: string
|
||||
}
|
||||
Reference in New Issue
Block a user