# car-manager **Repository Path**: js-hhq/car-manager ## Basic Information - **Project Name**: car-manager - **Description**: React Typescript - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-08 - **Last Updated**: 2024-07-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # React + TypeScript + Vite ## 创建项目和配置 - 初始化项目 ```cmd npm create vite@latest npm install npm dev ``` - 配置editorconfig ```txt 项目根目录创建.editorconfig文件 // .editorconfig # https://editorconfig.org root = true # 对所有文件生效 [*] charset = utf-8 indent_style = space # 缩进空格 indent_size = 2 end_of_line = lf # 换行符 lf(\n) cr(\r) crlf(\r\n) insert_final_newline = true # 代码最后新增一行 trim_trailing_whitespace = true # 修剪尾随的空格 ``` - 配置Prettier ```cmd npm install prettier // 配置.vscode/settings.json { "editor.formatOnSave": true, // 开启stylelint自动修复 "editor.codeActionsOnSave": { "source.fixAll": true }, "editor.defaultFormatter": "esbenp.prettier-vscode" } // .prettierrc { "arrowParens": "avoid", "bracketSameLine": false, "bracketSpacing": true, "semi": true, "experimentalTernaries": false, "singleQuote": false, "jsxSingleQuote": false, "quoteProps": "as-needed", "trailingComma": "all", "singleAttributePerLine": false, "htmlWhitespaceSensitivity": "css", "vueIndentScriptAndStyle": false, "proseWrap": "preserve", "insertPragma": false, "printWidth": 120, "requirePragma": false, "tabWidth": 2, "useTabs": false, "embeddedLanguageFormatting": "auto" } ```