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

@@ -1,47 +1,47 @@
#!/usr/bin/env node
const bedrockRelayService = require('../src/services/bedrockRelayService');
const bedrockRelayService = require('../src/services/bedrockRelayService')
function testModelMapping() {
console.log('🧪 测试模型映射功能...');
console.log('🧪 测试模型映射功能...')
// 测试用例
const testCases = [
// 标准Claude模型名
'claude-3-5-haiku-20241022',
'claude-3-5-sonnet-20241022',
'claude-3-5-sonnet-20241022',
'claude-3-5-sonnet',
'claude-3-5-haiku',
'claude-sonnet-4',
'claude-opus-4-1',
'claude-3-7-sonnet',
// 已经是Bedrock格式的
'us.anthropic.claude-sonnet-4-20250514-v1:0',
'anthropic.claude-3-5-haiku-20241022-v1:0',
// 未知模型
'unknown-model'
];
]
console.log('\n📋 模型映射测试结果:');
testCases.forEach(testModel => {
const mappedModel = bedrockRelayService._mapToBedrockModel(testModel);
const isChanged = mappedModel !== testModel;
const status = isChanged ? '🔄' : '✅';
console.log(`${status} ${testModel}`);
console.log('\n📋 模型映射测试结果:')
testCases.forEach((testModel) => {
const mappedModel = bedrockRelayService._mapToBedrockModel(testModel)
const isChanged = mappedModel !== testModel
const status = isChanged ? '🔄' : '✅'
console.log(`${status} ${testModel}`)
if (isChanged) {
console.log(`${mappedModel}`);
console.log(`${mappedModel}`)
}
});
})
console.log('\n✅ 模型映射测试完成');
console.log('\n✅ 模型映射测试完成')
}
// 如果直接运行此脚本
if (require.main === module) {
testModelMapping();
testModelMapping()
}
module.exports = { testModelMapping };
module.exports = { testModelMapping }