# react-ts **Repository Path**: scopesang/react-ts ## Basic Information - **Project Name**: react-ts - **Description**: 技术: React17 + Ts4 + hook 规范: eslit + prettier +commitlint - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-10 - **Last Updated**: 2022-03-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: React, TypeScript ## README # react项目搭建参考文章汇总 ## VSCode 使用 ESLint + Prettier 来统一 JS 代码 https://www.cnblogs.com/xjnotxj/p/10828183.html ## React17+Hook+TS4+VSCode开发环境搭建(2021) https://blog.csdn.net/8665048/article/details/117825511?spm=1001.2014.3001.5502 ## 配置commitlint的一些坑 + 如果是用powershell文件会用utf-16le编码导致之后运行报错 ```bash echo "module.exports = {extends: ['@commitlint/config-conventional'] };" > commitlint.config.js ``` [解法:](https://www.jianshu.com/p/c7b544d6b4f4)手动创建commitlint.config.js文件然后把module.exports = {extends: ['@commitlint/config-conventional']};粘贴进去 ## git提交报husky 的一些坑 + husky > commit-msg hook failed [例子:](https://blog.csdn.net/qq_42248955/article/details/111884333)需要注意commit的信息格式,feat: "xxx",英文+空格,引号内才是你的内容 + git commit提交报错subject may not be empty [subject-empty] [例子:](https://blog.csdn.net/qq_43565396/article/details/118015433)找了挺久发现是feat后面使用了中文的冒号,不符合规范所以导致报错,将其改为英文冒号再加个空格就可以了 ## eslint的一些坑 + 检查jsx语法规则 [indent配置:](https://segmentfault.com/q/1010000015129037) ## hugo+giteePage+githubAction 自动部署个人博客 typora+picGo 世界最好的md组合 https://zhuanlan.zhihu.com/p/367339276