chore: update TypeScript configuration and improve icon generation script

- Adjusted tsconfig.web.json to maintain formatting consistency.
- Enhanced tsconfig.json in the ui package by adding strict compiler options for better code quality.
- Modified the generate-icons script to remove an unused parameter, streamlining the function call.
This commit is contained in:
MyPrototypeWhat 2025-12-17 12:49:58 +08:00
parent 3c59b2d057
commit ad90d22be3
3 changed files with 6 additions and 4 deletions

View File

@ -92,7 +92,6 @@ function toCamelCase(filename: string): string {
* Generate a single icon component * Generate a single icon component
*/ */
async function generateIcon( async function generateIcon(
type: IconType,
inputDir: string, inputDir: string,
outputDir: string, outputDir: string,
svgFile: string svgFile: string
@ -194,7 +193,7 @@ async function main() {
for (const svgFile of svgFiles) { for (const svgFile of svgFiles) {
try { try {
const result = await generateIcon(type, inputDir, outputDir, svgFile) const result = await generateIcon(inputDir, outputDir, svgFile)
components.push(result) components.push(result)
console.log(`${svgFile} -> ${result.filename} (${result.componentName})`) console.log(`${svgFile} -> ${result.filename} (${result.componentName})`)
} catch (error) { } catch (error) {

View File

@ -20,8 +20,11 @@
"rootDir": ".", "rootDir": ".",
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"target": "ES2020" "target": "ES2020"
}, },
"exclude": ["node_modules", "dist", "**/*.test.*", "**/__tests__/**"], "exclude": ["node_modules", "dist", "**/*.test.*", "**/__tests__/**"],
"include": ["src/**/*", "stories/components/**/*"] "include": ["src/**/*", "stories/components/**/*", "scripts/**/*"]
} }

View File

@ -10,7 +10,7 @@
"packages/ai-sdk-provider/**/*", "packages/ai-sdk-provider/**/*",
"packages/extension-table-plus/**/*", "packages/extension-table-plus/**/*",
"packages/mcp-trace/**/*", "packages/mcp-trace/**/*",
"packages/shared/**/*", "packages/shared/**/*"
], ],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,