"baseUrl": "./src",
在tsconfig 配置路径 绝对路径 在src 下
配置代码格式化 工具
Prettier
yarn add --dev --exact prettier
配置文档
https://prettier.io/docs/en/install.html
然后
遇到 Cannot find module \mrm-task-lint-staged
就全局安装一下
npm install -g mrm mrm-task-lint-staged
https://prettier.io/docs/en/precommit.html
查看package.json 配置完成后
增加配置
"*.{js,css,md,ts,tsx}": "prettier --write"
解决 eslint 与 Prettier 冲突
npm install --save-dev eslint-config-prettier
安装完成后
-
"extends": [
-
"react-app",
-
"react-app/jest",
-
"prettier"
-
]
添加到 配置中
配置
-
npm install --save-dev
@commitlint/config-conventional
@commitlint/cli
-
echo
"module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
https://www.npmjs.com/package/@commitlint/config-conventional
转载:https://blog.csdn.net/qq_43141894/article/details/115609191
查看评论