refactor: standardize code formatting and linting configuration

- Replace .eslintrc.js with .eslintrc.cjs for better ES module compatibility
- Add .prettierrc configuration for consistent code formatting
- Update package.json with new lint and format scripts
- Add nodemon.json for development hot reloading configuration
- Standardize code formatting across all JavaScript and Vue files
- Update web admin SPA with improved linting rules and formatting
- Add prettier configuration to web admin SPA

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
千羽
2025-08-07 18:19:31 +09:00
parent 4a0eba117c
commit 8a74bf5afe
124 changed files with 20878 additions and 18757 deletions

View File

@@ -10,9 +10,9 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
const statsTimeRange = ref('all')
const sortBy = ref('')
const sortOrder = ref('asc')
// Actions
// 获取API Keys列表
const fetchApiKeys = async () => {
loading.value = true
@@ -31,7 +31,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
loading.value = false
}
}
// 创建API Key
const createApiKey = async (data) => {
loading.value = true
@@ -51,7 +51,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
loading.value = false
}
}
// 更新API Key
const updateApiKey = async (id, data) => {
loading.value = true
@@ -71,7 +71,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
loading.value = false
}
}
// 切换API Key状态
const toggleApiKey = async (id) => {
loading.value = true
@@ -91,7 +91,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
loading.value = false
}
}
// 续期API Key
const renewApiKey = async (id, data) => {
loading.value = true
@@ -111,7 +111,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
loading.value = false
}
}
// 删除API Key
const deleteApiKey = async (id) => {
loading.value = true
@@ -131,7 +131,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
loading.value = false
}
}
// 获取API Key统计
const fetchApiKeyStats = async (id, timeRange = 'all') => {
try {
@@ -148,7 +148,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
return null
}
}
// 排序API Keys
const sortApiKeys = (field) => {
if (sortBy.value === field) {
@@ -158,7 +158,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
sortOrder.value = 'asc'
}
}
// 获取已存在的标签
const fetchTags = async () => {
try {
@@ -173,7 +173,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
return []
}
}
// 重置store
const reset = () => {
apiKeys.value = []
@@ -183,7 +183,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
sortBy.value = ''
sortOrder.value = 'asc'
}
return {
// State
apiKeys,
@@ -192,7 +192,7 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
statsTimeRange,
sortBy,
sortOrder,
// Actions
fetchApiKeys,
createApiKey,
@@ -205,4 +205,4 @@ export const useApiKeysStore = defineStore('apiKeys', () => {
sortApiKeys,
reset
}
})
})