mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
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:
@@ -5,28 +5,25 @@
|
||||
* 降级到支持 CommonJS 的版本
|
||||
*/
|
||||
|
||||
const { execSync } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process')
|
||||
|
||||
console.log('🔧 修复 inquirer ESM 兼容性问题...\n');
|
||||
console.log('🔧 修复 inquirer ESM 兼容性问题...\n')
|
||||
|
||||
try {
|
||||
// 卸载当前版本
|
||||
console.log('📦 卸载当前 inquirer 版本...');
|
||||
execSync('npm uninstall inquirer', { stdio: 'inherit' });
|
||||
|
||||
console.log('📦 卸载当前 inquirer 版本...')
|
||||
execSync('npm uninstall inquirer', { stdio: 'inherit' })
|
||||
|
||||
// 安装兼容 CommonJS 的版本 (8.x 是最后支持 CommonJS 的主要版本)
|
||||
console.log('\n📦 安装兼容版本 inquirer@8.2.6...');
|
||||
execSync('npm install inquirer@8.2.6', { stdio: 'inherit' });
|
||||
|
||||
console.log('\n✅ 修复完成!');
|
||||
console.log('\n现在可以正常使用 CLI 工具了:');
|
||||
console.log(' npm run cli admin');
|
||||
console.log(' npm run cli keys');
|
||||
console.log(' npm run cli status');
|
||||
|
||||
console.log('\n📦 安装兼容版本 inquirer@8.2.6...')
|
||||
execSync('npm install inquirer@8.2.6', { stdio: 'inherit' })
|
||||
|
||||
console.log('\n✅ 修复完成!')
|
||||
console.log('\n现在可以正常使用 CLI 工具了:')
|
||||
console.log(' npm run cli admin')
|
||||
console.log(' npm run cli keys')
|
||||
console.log(' npm run cli status')
|
||||
} catch (error) {
|
||||
console.error('❌ 修复失败:', error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
console.error('❌ 修复失败:', error.message)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user