react_jira 项目笔记


创建项目

官方指南啊~ https://create-react-app.dev/docs/getting-started/

这里有一个 它会提示你,如果你用的是老版本的create react app的命令,你要uninstall一下哦~

安装prettier , commitlint 以及 eslint

prettier官网

yarn

yarn add --dev --exact prettier

Then, create an empty config file to let editors and other tools know you are using Prettier:

echo {}> .prettierrc.json

Next, create a .prettierignore file to let the Prettier CLI and editors know which files to not format. Here’s an example:

# Ignore artifacts:
build
coverage

由于 我们希望自动化的prettier 所以使用到pre-commit hook

安装eslint主要是注意与prettier的冲撞问题

commitlint

规范commit msg的规范


Author: Savannah
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source Savannah !
  TOC